在Neoshine Linux Server 3.0下安装svn1.5.0版本

下载

apr apr-util db-4.7.25 subversion-1.5.0

下载这些包到/tmp/目录下;


编译顺序为

apr–>berkeleydb–>apr-util–>subversion;

1, apr:
./buildconf
./configure
make
make install

2, berkeleydb
cd db-4.7.25/build_unix/
../dist/configure
make
make install

3, apr-util
./configure --with-berkeley-db=../db-4.7.25 --with-apr=../apr
make
make install

4, subversion
./configure --with-apr=/tmp/apr --with-apr-util=/tmp/apr-util/ --with-berkeley-db=/usr/local/BerkeleyDB.4.7/
成功configure之后,make时会出现以下error:

/tmp/subversion-1.5.0/libtool: line 1657: cd: ../db-4.7.25/lib: No such file or directory
libtool: link: cannot determine absolute directory name of `../db-4.7.25/lib'

打开libtool文件;
更改1657行:
#absdir=`cd "$dir" && pwd`

absdir=`cd "/tmp/db-4.7.25/lib" && pwd`
这样可以顺利编译通过;
安装时我第一次安装的时候遇到了问题——
问题一:
/usr/bin/ld: cannot find -lapr-0
collect2: ld returned 1 exit status
libtool: install: error: relink `libsvn_subr-1.la' with the above command before installing it

解决方法:
touch /etc/ld.so.conf.d/apr.conf
echo /usr/loca/apr/lib/ > /etc/ld.so.conf.d/apr.conf
ldconfig;

问题二:
mv: cannot stat `libsvn_subr-1.so.0.0.0': No such file or directory
libtool: install: error: relink `libsvn_subr-1.la' with the above command before installing it
make: *** [install-fsmod-lib]

解决方法:
遇到这个问题的原因是这个文件不存在,他是——/tmp/subversion-1.5.0/subversion/libsvn_subr/.lib/libsvn_subr-1.so.0.0.0
因为make通过了,而且configure中又是将编译为动态共享库加进去的,所以我就想到用之前成功make过的命令copy过来,再编译一下,我这里的命令如下:

cd subversion/libsvn_subr && /bin/sh /tmp/subversion-1.5.0/libtool --tag=CC --silent --mode=link gcc -g -O2 -g -O2 -pthread -L../db-4.7.25/lib -L/usr/local/lib -rpath /usr/local/lib -o libsvn_subr-1.la atomic.lo auth.lo cmdline.lo compat.lo config.lo config_auth.lo config_file.lo config_win.lo constructors.lo ctype.lo date.lo dso.lo error.lo hash.lo io.lo iter.lo kitchensink.lo lock.lo md5.lo mergeinfo.lo nls.lo opt.lo path.lo pool.lo prompt.lo properties.lo quoprint.lo simple_providers.lo sorts.lo ssl_client_cert_providers.lo ssl_client_cert_pw_providers.lo ssl_server_trust_providers.lo stream.lo subst.lo svn_base64.lo svn_string.lo target.lo time.lo user.lo username_providers.lo utf.lo utf_validate.lo validate.lo version.lo win32_crashrpt.lo win32_xlate.lo xml.lo /tmp/apr-util/libaprutil-0.la -ldb-4.2 -lexpat /tmp/apr/libapr-0.la -lrt -lm -lcrypt -lnsl -lpthread -ldl -lz

编译通过!

返回/tmp/subversion-1.5.0,继续
make
make install
顺利安装;
注意:

apr-util的编译一定要放在berkeleydb的后面,且编译参数中需要指定berkeleydb的安装或编译路径,否则,在最终编译subversion时会出现一下错误——

configure: error: APR-UTIL was installed independently, it won’t be possible to use the specified Berkeley DB: /usr/local/BerkeleyDB.4.7/

你可能感兴趣的:(linux,SVN,server,ssl,command,subversion)