第一步:安装 scons
OpenNebula 需要使用scons这个软件来生成Makefile文件,并自动编译, 首先必须确认系统已经安装scons。
如果没有安装, 请自行安装。 最简单的办法是使用命令 yum install scons 或者 apt-get install scons
如果这两个自动化的方法都不行, 那自己下载 scons, 我下载的是 scons-2.1.0.tar.gz
具体下载目录在 /2012年资料/3月/14日/在红帽RHEL5上安装OpenNebula-2.0.1/
解压后进入目录里面
[root@localhost ~]# cd scons-2.1.0 [root@localhost scons-2.1.0]# Python setup.py install
安装完成后, 进入到 OpenNebula-2.0.1目录继续。第二步:执行scons进行编译
[root@localhost opennebula-2.0.1]# pwd /root/opennebula-2.0.1 [root@localhost opennebula-2.0.1]# scons scons: Reading SConscript files ... Testing recipe: pkg-config Error calling pkg-config xmlrpc_server_abyss++ --static --libs Testing recipe: xmlrpc-c-config Error calling xmlrpc-c-config c++2 abyss-server --libs --cflags Testing recipe: mixed hardcoded libraries and xmlrpc-c-config (debian lenny) Error calling xmlrpc-c-config c++2 abyss-server --libs --cflags Testing recipe: hardcoded libraries for Mac OS X (installed using port) g++ .xmlrpc_test/xmlrpc_test.27c461.cc -o .xmlrpc_test/xmlrpc_test.27c461.cc.out -I/opt/local/include -L/opt/local/lib -lwwwxml -lxmltok -lxmlparse -lwwwzip -lwwwinit -lwwwapp -lwwwtelnet -lwwwhtml -lwwwnews -lwwwhttp -lwwwmime -lwwwgopher -lwwwftp -lwwwfile -lwwwdir -lwwwcache -lwwwstream -lwwwmux -lwwwtrans -lwwwcore -lwwwutils -lmd5 -ldl -lz -lpthread -lxmlrpc_client++ -lxmlrpc_client -lxmlrpc++ -lxmlrpc -lxmlrpc_util -lxmlrpc_xmlparse -lxmlrpc_xmltok -lxmlrpc_server_abyss++ -lxmlrpc_server++ -lxmlrpc_server_abyss -lxmlrpc_server -lxmlrpc_abyss 1>>.xmlrpc_test/xmlrpc_test.27c461.cc.log 2>&1 Error searching for xmlrpc-c libraries. Please check this things: * You have installed development libraries for xmlrpc-c. One way to check this is calling xmlrpc-c-config that is provided with the development package. * Check that the version of xmlrpc-c is at least 1.06. You can do this also calling: $ xmlrpc-c-config --version * If all this requirements are already met please send log files located in .xmlrpc_test to the mailing list. TypeError: 'str' object is not callable: File "/root/opennebula-2.0.1/SConstruct", line 150: exit(-1)
提示出错信息 Error searching for xmlrpc-c libraries解决办法如下 :
wget CentOS.karan.org/el5/extras/testing/SRPMS/xmlrpc-c-1.06.18-1.el5.kb.src.rpm rpmbuild --rebuild xmlrpc-c-1.06.18-1.el5.kb.src.rpm cd /usr/src/RedHat/RPMS/i386/ rpm -i xmlrpc-c-1.06.18-1.x86_64.rpm rpm -i xmlrpc-c-devel-1.06.18-1.x86_64.rpm
安装完毕后, 再回到 OpenNebula-2.0.1目录 继续执行第二步即可。第三步:安装 OpenNebula,并配置