ICE-3.4.2安装记录(Ubuntu10.04)
转载自:http://www.linuxidc.com/Linux/2011-09/42289.htm
ICE-3.3的安装可以使用ubuntu自带的新立得安装。
本文主要介绍手动安装ice3.4的步骤:
1. 下载第三方包和Ice源文件:http://www.zeroc.com/download.html(官方下载页面)
在Source Distributions一栏下下载源文件:Ice-3.4.2.tar.gz;在Third-Party Source Code 一栏下选择ThirdParty-Sources-3.4.2.tar.gz第三方压缩包下载。
2. 安装第三方依赖库
解压ThirdParty-Sources-3.4.2.tar.gz:sudo tar -xzvf ThirdParty-Sources-3.4.2.tar.gz 。
2.1) 安装Berkeley DB
$sudo tar zxvf db-4.8.30.NC.tar.gz
$cd db-4.8.30.NC/build_unix
$sudo ../dist/configure --prefix=/usr --enable-cxx
(说明:db的默认安装prefix路径是/usr/local/BerkeleyDB.4.6,需要改为/usr,否则make Ice时会找不到路径)
$sudo make #编译
$sudo make install #安装
2.2)安装 bzip2-1.0.6.tar.gz
$sudo tar zxvf bzip2-1.0.6.tar.gz
$cd bzip2-1.0.6
$sudo make install
2.3)安装 expat-2.0.1.tar.gz
$sudo tar zxvf expat-2.0.1.tar.gz
$cd expat-2.0.1
$sudo ./configure
$sudo sudo make install
2.4)安装openssl-0.9.8d.tar.gz
$sudo tar zxvf openssl-0.9.8d.tar.gz
$cd openssl-0.9.8d
$./config --prefix=/usr --openssldir=/usr/openssl
(注意:prefix为/usr/local/ssl,openssldir默认为/usr/ssl/openssl,需要改为上面的,否则默认安装路径会找不到。)
$ sudo make
$ sudo make test
$ sudo make install
2.5)安装mcpp
$sudo apt-get install libmcpp-dev
3.安装Ice-3.4.2
$sudo tar zxvf Ice-3.4.2.tar.gz
$cd Ice-3.4.2/cpp
$export LD_LIBRARY_PATH=/opt/Ice-3.4.2/lib
$make
$sudo make install
4.安装过程中出现的一些错误,及解决方法:
4.1)错误提示:/usr/lib.ld:Error:cannot find -lmcpp --->解决方法:应该是mcpp之前没有安装成功,将mcpp重新安装成功后就行
4.2)错误提示:fatal error:db_cxx.h:No such file or directory -->解决方法:之前没有把db-4.8.3安装成功,重新安装一遍(当然如果你没有设置ICEZ_HOME环境变量也会出现这样的问题,所以建议使用全路径编译)
4.3)安装Ice完成后,运行例子错误提示:error while loading shared libraries: libIce.so.34: cannot open shared object file: No such file or directory -->解决办法:应该是之前编译Ice某些目录配置不对;使用命令 export LD_LIBRARY_PATH=/opt/Ice-3.4.2/lib重新来导出动态链接库目录即可。
浙公网安备 33010602011771号