centos安裝git原始碼包
阿新 • • 發佈:2019-01-24
- 解壓原始碼包
- cd /usr/local/src/git-master
- make prefix=/usr/local all
- make prefix=/usr/local install
如果報這個錯誤: make: * [git-credential-store] 錯誤 1
解決辦法:
cd /usr/local/src/
wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
tar -zxvf libiconv-1.14.tar.gz
cd libiconv-1.14
./configure -prefix=/usr/local/libiconv && make && sudo make install
然後回到git繼續編譯:
- cd /usr/local/src/git-master
- make configure
./configure --prefix=/usr/local -with-iconv=/usr/local/libiconv
- make
make install
檢視git版本: git –version