KUbuntu/Ubuntu 14.04 (降級)安裝 SVN 1.7&&Ubuntu14.10安裝subversion1版本

來源:互聯網
上載者:User

Reference:

https://archive.apache.org/dist/subversion/

http://www.2cto.com/os/201501/369067.html

http://www.68idc.cn/help/server/linux/20141227150488.html

Ubuntu14.10安裝subversion版本

安裝了ubuntu-14.10版本後發現預設安裝subversion 1.8. 而1.8版本與目前XP上使用的1.6版本無法相容,網上搜尋了下發現使用1.8版本的人並不多,為了避免開發環境切換帶來的開銷,暫不想將XP下也升級到1.8. 那隻能ubuntu上安裝1.6.


1.下載subversion-1.6.17.tar.gz
http://download.csdn.net/detail/sunwill_chen/8354589


2.下載subversion-deps-1.6.17.tar.bz2
http://download.csdn.net/detail/sunwill_chen/8354593


3.#apt-get install gcc make libssl-dev libexpat1-dev


4.#tar xvf subversion-1.6.17.tar.gz


5.#tar xvf subversion-deps-1.6.17.tar.bz2


6.#cd subversion-1.6.17


7.#./configure


8.#make && make install


9.#ln -s /usr/lib/i386-linux-gnu/libexpat.so /usr/lib/i386-linux-gnu/libexpat.so.0


10.查看svn版本號碼:
# svn --version
svn, version 1.6.17 (r1128011)
compiled Jan 12 2015, 20:05:45


問題:
1.configure: error: no XML parser was found: expat or libxml 2.x required

解決:apt-get install libxml2-dev
(注: 這個可以不需要安裝,後面安裝了libexpat1-dev才真正起作用)


2.make最後出現錯誤:

/home/tools/subversion-1.6.17/subversion/libsvn_ra_neon/.libs/libsvn_ra_neon-1.so: undefined reference to `xmlFreeParserCtxt'
/home/tools/subversion-1.6.17/subversion/libsvn_ra_neon/.libs/libsvn_ra_neon-1.so: undefined reference to `xmlParseChunk'
/home/tools/subversion-1.6.17/subversion/libsvn_ra_neon/.libs/libsvn_ra_neon-1.so: undefined reference to `xmlCreatePushParserCtxt'
collect2: error: ld returned 1 exit status
解決:經過分析代碼發現沒有EXPAT才會有這個問題,因為安裝expat, 
#apt-get install libexpat1-dev


3.運行svn發現庫連結錯誤,
svn: error while loading shared libraries: libexpat.so.0: cannot open shared object file: No such file or directory
解決:使用dpkg -L libexpat1-dev安裝在哪個目錄,一看沒有這個檔案,做個軟連結即可。
#ln -s /usr/lib/i386-linux-gnu/libexpat.so /usr/lib/i386-linux-gnu/libexpat.so.0


KUbuntu/Ubuntu 14.04 (降級)安裝 SVN 1.7

Step 1: 增加源到 source.list

sudo add-apt-repository "deb http://extras.ubuntu.com/ubuntu saucy main"

sudo add-apt-repository "deb http://de.archive.ubuntu.com/ubuntu/ saucy main universe restricted multiverse"


Step 2: 刪除 svn 1.8 package

sudo apt-get remove subversion libsvn1


Step 3: 更新源

sudo apt-get update


Step 4: 安裝 svn 1.7

sudo apt-get install subversion=1.7.9-1+nmu6ubuntu3 libsvn1=1.7.9-1+nmu6ubuntu3 subversion-tools=1.7.9-1+nmu6ubuntu3


Step 5: 鎖定 SVN to 1.7 to 防止自動升級

echo subversion hold | sudo dpkg --set-selections

echo libsvn1 hold | sudo dpkg --set-selections

echo libserf1 hold | sudo dpkg --set-selections


Step 6: 從源sources.list中移除 Step 1 增加的行

sudo gedit /etc/apt/sources.list

移除:deb http://extras.ubuntu.com/ubuntu saucy main

移除:deb http://de.archive.ubuntu.com/ubuntu/ saucy main universe restricted multiverse


Step 7: 更新源

sudo apt-get update


Step 8: 查看svn版本

svn --version

~$ svn --version
svn,版本 1.7.9 (r1462340)
編譯於 Oct 15 2013,12:40:34

Copyright (C) 2013 The Apache Software Foundation.
This software consists of contributions made by many people; see the NOTICE
file for more information.
Subversion is open source software, see http://subversion.apache.org/

可使用以下的版本庫訪問模組:

* ra_neon : 通過 WebDAV 協議使用 neon 訪問版本庫的模組。
- 處理“http”方案
- 處理“https”方案
* ra_svn : 使用 svn 網路通訊協定訪問版本庫的模組。  - 使用 Cyrus SASL 認證
- 處理“svn”方案
* ra_local : 訪問本地磁碟的版本庫模組。
- 處理“file”方案
* ra_serf : 通過 WebDAV 協議使用 serf 訪問版本庫的模組。
- 處理“http”方案
- 處理“https”方案

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.