標籤:svn 編譯安裝svn subversion 編譯安裝subversion
svn的參考網址:http://subversion.apache.org(在該網址中可下載svn的資源檔)
擷取相應版本:
wget -c http://download.nextag.com/apache/subversion/subversion-1.8.11.tar.gz
安裝過程:
tar -zxvf subversion-1.8.11.tar.gz
cd subversion-1.8.11/
./configure --help (大致看一下參數資訊)
./configure --prefix=/usr/local/svnup
這時出現錯誤:
configure: error: no suitable APR found
好像APR沒有,這個參考這個地址:http://apr.apache.org/
我們可以下載這三個包安裝:
wget -c http://mirror.cc.columbia.edu/pub/software/apache//apr/apr-1.5.1.tar.gz
wget -c http://mirror.cc.columbia.edu/pub/software/apache//apr/apr-util-1.5.4.tar.gz
wget -c http://mirror.cc.columbia.edu/pub/software/apache//apr/apr-iconv-1.2.1.tar.gz
依次安裝:
./configure --prefix=/usr/local/apr/apr-util-1.5.4
出錯:
configure: error: APR could not be located. Please use the --with-apr option.
(好像需要--with-apr這個選項)
那就先安裝:apr-1.5.1
tar -zxvf apr-1.5.1.tar.gz
cd apr-1.5.1
./configure --prefix=/usr/local/apr/apr-1.5.1
出現:rm: cannot remove ‘libtoolT‘: No such file or directory (不管它,不就是不能刪除‘libtoolT‘,沒有就不用刪除唄!)
make
make install
接下來就安裝apr-util-1.5.4
./configure --prefix=/usr/local/apr/apr-util-1.5.4 --with-apr=/usr/local/apr/apr-1.5.1(這回就加上這個之前apr的安裝目錄)
make
make install
好像還有一個沒有安裝啊(apr-iconv-1.2.1 用於字元集的轉換)查看三者的./configure --help 發現它是帶於apr-util-1.5.4中的,那就在apr-util-1.5.4安裝之前先安裝apr-iconv-1.2.1
tar -zxvf apr-iconv-1.2.1.tar.gz
./configure --prefix=/usr/local/apr/apr-iconv-1.2.1
出現錯誤configure: error: APR could not be located. Please use the --with-apr option
看來它也要apr的安裝目錄,那就如下吧
./configure --prefix=/usr/local/apr/apr-iconv-1.2.1 --with-apr=/usr/local/apr/apr-1.5.1
make
make install
現在再次安裝apr-util-1.5.4
./configure --prefix=/usr/local/apr/apr-util-1.5.4 --with-apr=/usr/local/apr/apr-1.5.1 --with-iconv=/usr/local/apr/apr-iconv-1.2.1
make clean
make
make install
-------------------------以上三個包安裝完成-------------------------
最後再看subversion-1.8.11 中的./configure --help ( --with-apr=PATH prefix for installed APR, path to APR build tree,or the full path to apr-config)
是不是只安裝個apr就可以了,先別說 ,試試
./configure --prefix=/usr/local/svn-1.8.11(為了以後的版本管理,我把安裝目錄改成了加版本號碼的形式) --with-apr=/usr/local/apr/apr-1.5.1
又出錯誤了,出現:configure: error: no suitable APRUTIL found
那就是說還要apr-util 。(--with-apr-util --with-apr-util=PATH prefix for installed APU, path to APU build tree, or the full path to apu-config)
那就加上唄
再次配置如下:
./configure --prefix=/usr/local/svn-1.8.11 --with-apr=/usr/local/apr/apr-1.5.1 --with-apr-util=/usr/local/apr/apr-util-1.5.4
尼瑪!又出錯了,
configure: error: Subversion requires SQLite
看來還要安裝SQLite(能嵌入SQL資料庫中的一個引擎),
找到官網:http://www.sqlite.org/
得到下載連結:wget -c http://www.sqlite.org/2015/sqlite-autoconf-3080800.tar.gz
./configure --prefix=/usr/local/sqlite-autoconf-3080800
make
make install
再次編譯subversion-1.8.11
./configure --prefix=/usr/local/svn-1.8.11 --with-apr=/usr/local/apr/apr-1.5.1 --with-apr-util=/usr/local/apr/apr-util-1.5.4 --with-sqlite=/usr/local/sqlite-autoconf-3080800
(瑪啊!這次通過了)
make
make install
********************************* :)
本文出自 “我的IT生涯” 部落格,請務必保留此出處http://quietnight.blog.51cto.com/7163892/1606227
在centos上進行svn的編譯安裝