我在 linux mint 12 lisa 上运行了以下命令:
1). sudo rm -rf /var/lib/apt/lists/* -vf
2). sudo apt-get update
3). sudo apt-get install git
我在运行 3. 即安装 git 时出现以下错误:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package git
我的/etc/apt/sources.list 文件包含以下内容:
deb http://packages.linuxmint.com/ lisa main upstream import
deb http://archive.ubuntu.com/ubuntu/ oneiric main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ oneiric-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ oneiric-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ oneiric partner
deb http://packages.medibuntu.org/ oneiric free non-free
# deb http://archive.getdeb.net/ubuntu oneiric-getdeb apps
# deb http://archive.getdeb.net/ubuntu oneiric-getdeb games
sudo apt-get upgrade 显示如下:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
最佳答案
您需要先安装 aptitude。
sudo apt-get install aptitude
然后使用命令安装git
sudo aptitude install git
关于linux - 无法安装git,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17973074/