2014年5月25日 12:26:14
需要文件: svn apr apr-util sqlite3 serf
安装 apr
./configuremake && make install安装apr-util./configure --with-apr=/usr/local/apr/bin/apr-1-configmake && make install安装 sqlite3wget http://www.sqlite.org/sqlite-amalgamation-3071501.zip 将其解压到svn源代码目录里更名为sqlite-amalgamation
安装 serf
serf 这个库提供的是对http和https协议的支持。值得说明的是,1.8版本之前这里依赖的是neon,1.8之后改成了serf (艹); 当前版本的serf是用scons命令安装的,类似configure, so, 也要先安装scons, but, scons的安装是需要python的, 安装完python就可以了
安装svn
./configure --with-apr=/usr/local/apr/bin/apr-1-config --with-apr-util=/usr/local/apr/bin/apu-1-config --with-serf=/usr/local/serf
注意,如果以前的系统中安装有rpm的 apr,apr-util 要将它们卸载掉,否则在执行 svn up 时会出现错误提示
svn: symbol lookup error: /usr/local/lib/libsvn_subr-1.so.0: undefined symbol: apr_atomic_xchgptr
解决方法时,卸载掉用rpm安装的apr,apr-util
rpm -e --allmatches apr-util --nodeps
rpm-e --allmatches apr --nodeps
还有:
sqlite3 不用安装,只用解压后,复制到svn解压后的源码包中
serf 是让svn识别http协议的 默认安装的prefix是/usr/local/serf
-------------------
有找了个机器安装,这次是先将原有的apr/apr-util 卸载掉再照上边的步骤安装时出的错:
如果make svn的时候提示错误: make: *** [subversion/libsvn_subr/libsvn_subr-1.la] Error 1
就试试在configure时,将 --with-apr=... --with-apr-util=... 的值指向源码包里
如果出现这个错误提示:
Serf was explicitly enabled but an appropriate version was not found
可能的原因是,在配置svn的./configure时,指定的apr/apr-util的配置文件路径不对,切记一个是apr/bin/apr-1-config,一个是 apr/bin/apu-1-config
如果svn up时出现错误提示:
svn: error while loading shared libraries: libserf-1.so.1: cannot open shared object file: No such file or directory
原因是: serf 1.2.1 版本没有libserf-1.so.1, 但在 serf 1.3.5有(不清楚1.3.*是否都有)
可能,安装了serf后可能开会出现上边提示,这时可以在/usr/lib64 里建立一个软连接
ln -s /usr/local/serf/lib/libserf-1.so.1.3.0 /usr/lib64/libserf-1.so.1
Linux安装软件真蛋疼,在两个虚拟机上安装,就因为安装软件的顺序不一样,出的错还不一样,导致安装的命令也不一样
参考: