Debian APT无法安装任何软件包

时间:2018-02-11 05:36:37

标签: linux debian apt xfce

我在戴尔XPS 15(9560)上使用XFCE4运行Debian 9。最近我遇到了apt的问题。如果我尝试使用apt-get install运行任何东西,则以下内容始终返回:

william@debian:~$ sudo apt-get install vim
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:
 vim : Depends: vim-common (= 2:7.4.488-7+deb8u3) but 2:8.0.0197-4+deb9u1 is to be installed
E: Unable to correct problems, you have held broken packages.

我尝试过sudo apt-get updatesudo apt-get upgradesudo apt --fix-broken installsudo apt-get clean等等。

他们中的一些人会返回这样的消息:

william@debian:~$ sudo apt-get update
Ign:1 http://ftp.us.debian.org/debian jessie InRelease
Hit:2 http://ftp.us.debian.org/debian jessie Release
Reading package lists... Done

william@debian:~$ sudo apt-get install upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package upgrade

william@debian:~$ sudo apt-get install dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package dist-upgrade

请多多帮助和感谢:)

1 个答案:

答案 0 :(得分:-1)

请更新您的sources.list文件...... 使用终端并使用权限打开

$ sudo gedit /etc/apt/sources.list

将链接粘贴到此处,您可以在互联网上找到它们

或粘贴这些:

deb http://deb.debian.org/debian伸展主力 deb-src http://deb.debian.org/debian拉伸主要

deb http://deb.debian.org/debian stretch-updates main deb-src http://deb.debian.org/debian stretch-updates main

deb http://security.debian.org/debian-security/延伸/更新主要内容 deb-src http://security.debian.org/debian-security/延伸/更新主要

感谢你问对不起,如果我在某处错了