当前位置:   article > 正文

Linux 源码编译SVN_apr-util下载

apr-util下载

一、下载安装包

SVN源码包下载(我这里下载的是1.14.2版本)

https://subversion.apache.org/download.cgi

apr源码包(我这里下载的是1.7.2版本)

https://dist.apache.org/repos/dist/release/apr/

apr-util源码包(我这里下载的是1.6.3版本)

https://dist.apache.org/repos/dist/release/apr/

expat源码包(我这里下载的是2.5.0版本)

https://github.com/libexpat/libexpat/releases

SCons源码包(我这里下载的是2.4.1版本,高版本的需要用Python3编译,编译成功了还会有其他问题,所以没用最新的版本)

https://sourceforge.net/projects/scons/files/scons/2.4.1/scons-2.4.1.tar.gz/download

Python的setuptools源码包版本(使用Python安装SCons时需要的模块,如果安装过了就不需要再安装)

http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz

serf源码包(我这里下载的是1.3.9版本)

http://archive.apache.org/dist/serf/

sqlite-amalgamation源码包(我这里下载的是3.40.1版本)

http://www.sqlite.org


二、安装必要依赖

yum -y install zlib zlib-devel openssl openssl-devel


三、编译安装源码

1.安装apr

  1. [root@SVNSAPP1]# tar -xvf apr-1.7.2.tar.gz
  2. [root@SVNSAPP1 apr-1.7.2]#cd apr-1.7.2
  3. [root@SVNSAPP1 apr-1.7.2]#./configure --prefix=/data/apr
  4. [root@SVNSAPP1 apr-1.7.2]#make && make instlal

如果报错:rm: cannot remove `libtoolT’: No such file or directory

处理:将configure文件中的R M " RM "RM"cfgfile"这行代码注释掉就可以了

2.安装apr-util

  1. [root@SVNSAPP1]# tar -xvf apr-util-1.6.3.tar.gz
  2. [root@SVNSAPP1]# cd apr-util-1.6.3
  3. [root@SVNSAPP1 apr-util-1.6.3]#./configure --prefix=/data/apr-util --with-apr=/data/apr
  4. [root@SVNSAPP1 apr-util-1.6.3]# make && make install

如果报错:错误:xml/apr_xml.c:35:19: 错误:expat.h:没有那个文件或目录

没有expat头文件,需要编译安装expat,解压上面下载的expat:

  1. [root@SVNSAPP1 expat-2.5.0]# ./configure
  2. [root@SVNSAPP1 expat-2.5.0]# make && make install

3.安装SCons

  1. [root@SVNSAPP1]# tar -xzf scons-2.4.1.tar.gz
  2. [root@SVNSAPP1]# cd scons-2.4.1
  3. [root@SVNSAPP1 scons-2.4.1]# python setup.py install
  4. [root@SVNSAPP1 scons-2.4.1]# scons

安装完成后在当前目录下运行scons时,如果显示scons:*** No SConstruct file found. 说明安装成功。

从Subversion-1.8开始需要使用serf软件包支持访问http协议的版本库,如果不安装serf的话,在使用SVN时路径中有http的话,就会报错svn: E170000: Unrecognized URL scheme for ${url}。

安装serf必须要通过SCons来安装,所以这里要安装SCons。在执行Python setup.py install命令时,如果报错:ImportError: No module named setuptools,需要安装Python的setuptools模块,安装命令如下:

  1. [root@SVNSAPP1]# tar zxvf setuptools-0.6c11.tar.gz
  2. [root@SVNSAPP1]# cd setuptools-0.6c11
  3. // 编译setuptools
  4. [root@SVNSAPP1 setuptools-0.6c11]# python setup.py build
  5. // 开始执行setuptools安装
  6. [root@SVNSAPP1 setuptools-0.6c11]# python setup.py install

4.安装serf

解压下载的serf安装包,然后执行下面的命令:

  1. [root@SVNSAPP1]# tar -jxvf serf-1.3.9.tar.bz2
  2. [root@SVNSAPP1]# cd serf-1.3.9
  3. [root@SVNSAPP1 serf-1.3.9]# scons PREFIX=/usr/local/serf APR=/data/apr APU=/data/apr-util
  4. [root@SVNSAPP1 serf-1.3.9]# scons PREFIX=/usr/local/serf LIBDIR=/usr/local/serf/lib
  5. [root@SVNSAPP1 serf-1.3.9]# scons install
  6. [root@SVNSAPP1 serf-1.3.9]# cp /usr/local/serf/lib/libserf-1.so* /usr/lib/

5.安装svn

首先需要把上面下载的sqlite-amalgamation源码包解压,里面有四个头文件,然后在要安装SVN的目录下创建sqlite-amalgamation文件夹,把刚才解压后得到的四个头文件移到创建的目录下,这里我SVN的安装目录是/usr/local/SVN

  1. [root@SVNSAPP1]# tar -xvf sqlite-amalgamation-3400100.tar.gz
  2. [root@SVNSAPP1]# mkdir -p /usr/local/SVN/sqlite-amalgamation
  3. [root@SVNSAPP1]# mv sqlite-amalgamation-3400100/* /usr/local/SVN/sqlite-amalgamation
  1. [root@SVNSAPP1]# tar -xvf subversion-1.14.2.tar.gz
  2. [root@SVNSAPP1]# cd subversion-1.14.2
  3. [root@SVNSAPP1 subversion-1.14.2]# ./configure --prefix=/usr/local/SVN --with-apr=/data/apr --with-apr-util=/data/apr-util --with-serf=/usr/local/serf --with-lz4=internal --with-utf8proc=internal
  4. [root@SVNSAPP1 subversion-1.14.2]# make
  5. [root@SVNSAPP1 subversion-1.14.2]# make install

如果报错:configure:error:subversion requires zlib

需要安装zlib,zlib源码包(我这里下载的是1.2.13版本)

http://www.zlib.net/

如果报错:configure: error: Subversion requires LZ4 >= r129, or use --with-lz4=internal

解决:./configure命令添加 --with-lz4=internal

如果报错:configure: error: Subversion requires UTF8PROC

解决:./configure命令添加 --with-utf8proc=internal


四、添加环境变量

  1. [root@SVNSAPP1]# echo "export PATH=/data/svn/bin:$PATH" >> /etc/profile
  2. [root@SVNSAPP1]# source /etc/profile


五、查看安装信息

  1. [root@SVNSAPP1]# svnserve --version
  2. svnserve,版本 1.14.2 (r1899510)
  3. 编译于 Feb 28 202314:44:58 在 aarch64-unknown-linux-gnu
  4. Copyright (C) 2022 The Apache Software Foundation.
  5. This software consists of contributions made by many people;
  6. see the NOTICE file for more information.
  7. Subversion is open source software, see http://subversion.apache.org/
  8. 下列版本库后端(FS) 模块可用:
  9. * fs_fs : 模块与文本文件(FSFS)版本库一起工作。
  10. * fs_x : Module for working with an experimental (FSX) repository.
  1. [root@SVNSAPP1]# svn --version
  2. svn,版本 1.14.2 (r1899510)
  3. 编译于 Feb 28 202314:44:58 在 aarch64-unknown-linux-gnu
  4. Copyright (C) 2022 The Apache Software Foundation.
  5. This software consists of contributions made by many people;
  6. see the NOTICE file for more information.
  7. Subversion is open source software, see http://subversion.apache.org/
  8. 可使用以下的版本库访问模块:
  9. * ra_svn : 使用 svn 网络协议访问版本库的模块。
  10. - 处理“svn”方案
  11. * ra_local : 访问本地磁盘的版本库模块。
  12. - 处理“file”方案
  13. * ra_serf : Module for accessing a repository via WebDAV protocol using serf.
  14. - using serf 1.3.9 (compiled with 1.3.9)
  15. - 处理“http”方案
  16. - 处理“https”方案
  17. The following authentication credential caches are available:
  18. * GPG-Agent

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/繁依Fanyi0/article/detail/168859
推荐阅读
相关标签
  

闽ICP备14008679号