我在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.
答案 0 :(得分:2)
我遇到了类似的问题,并通过在一个命令行上同时运行更新和升级来解决它。
sudo apt-get update && sudo apt-get upgrade -y
之后我通常使用以下命令安装git:
sudo apt-get install git
答案 1 :(得分:1)
您需要先安装aptitude。
sudo apt-get install aptitude
然后使用命令
安装gitsudo aptitude install git