1. 程式人生 > >centos安裝git原始碼包

centos安裝git原始碼包

  1. 解壓原始碼包
  2. cd /usr/local/src/git-master
  3. make prefix=/usr/local all
  4. 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繼續編譯:

  1. cd /usr/local/src/git-master
  2. make configure
  3. ./configure --prefix=/usr/local -with-iconv=/usr/local/libiconv
  4. make
  5. make install

    檢視git版本: git –version