无法通过以下方式在 Debian 7.2 上安装任何软件包apt-get
root@sandbox:~# apt-get install curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
curl : Depends: libcurl3 (= 7.26.0-1+wheezy3) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
root@sandbox:~# apt-cache policy curl
curl:
Installed: (none)
Candidate: 7.26.0-1+wheezy3
Version table:
7.26.0-1+wheezy3 0
500 http://security.debian.org/ wheezy/updates/main amd64 Packages
500 http://mirror.yandex.ru/debian-security/ wheezy/updates/main amd64 Packages
500 http://mirror.mephi.ru/debian-security/ wheezy/updates/main amd64 Packages
root@sandbox:~# cat /etc/apt/sources.list
deb http://security.debian.org/ wheezy/updates main contrib
deb-src http://security.debian.org/ wheezy/updates main contrib
#deb http://mirror.yandex.ru/debian-security/ wheezy/updates main contrib non-free
#deb-src http://mirror.yandex.ru/debian-security/ wheezy/updates main contrib non-free
#deb http://mirror.mephi.ru/debian-security/ wheezy/updates main contrib non-free
#deb-src http://mirror.mephi.ru/debian-security/ wheezy/updates main contrib non-free
apt-get -f install
也不起作用
答案1
您的系统sources.list
已损坏 - 它缺少存储库的“稳定”部分,其中包含大部分 Debian 软件包。您只添加了“wheezy/updates”部分,其中仅包含“stable”中某些软件包的更新。
它应该看起来像这样(用生成http://debgen.simplylinux.ch/,假设您位于俄罗斯):
deb http://ftp.ru.debian.org/debian stable main contrib non-free
deb http://ftp.debian.org/debian/ wheezy-updates main contrib non-free
deb http://security.debian.org/ wheezy/updates main contrib non-free