在刚安装的ubuntu下安装git会出现各种问题,通过查找资料,发现网上有两种安装方式,但都遇到了问题,现在就写一下自己的安装过程和遇到的问题
方法一:通过下载git包进行安装
首先是下载git包
# wget http://www.kernel.org/pub/software/scm/git/git-1.8.2.3.tar.gz
然后解压安装时发现网上教程中的都行不通,缺了很多包,不是缺这就是缺那,所以放弃这个方法
方法二:通过更新后安装(安装成功)
首先是
#sudo apt-get update
更新到后面会遇到这个问题
……
W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used.GPG error: http://security.ubuntu.com lucid-security Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu
Archive Automatic Signing Key
……
这时进行安装git
#sudo apt-get install git
会出问题:git:depends:liberror-perl but it is not installable
发现还是缺少包,就是更新不完全
解决方案
#sudo apt-get clean
#cd /var/lib/apt
#sudo mv lists lists.old
#sudo mkdir -p lists/partial
#sudo apt-get clean
#sud