无法禁用第三方存储库进行升级

无法禁用第三方存储库进行升级

我无法禁用第三方存储库进行升级。

我尝试了所有选项,包括“软件和更新”[其他软件],全部勾选。还尝试了apt-get install -f终端提示的选项。还尝试了sudo software-properties-gtk

无论我怎么尝试,这种情况都会发生。

Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-3.16.0-33-generic_3.16.0-33.44_amd64.deb
 /var/cache/apt/archives/linux-image-3.16.0-34-generic_3.16.0-34.47_amd64.deb
 /var/cache/apt/archives/linux-image-3.16.0-36-generic_3.16.0-36.48_amd64.deb
 /var/cache/apt/archives/linux-image-3.16.0-37-generic_3.16.0-37.51_amd64.deb
 /var/cache/apt/archives/linux-image-3.16.0-38-generic_3.16.0-38.52_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

The following packages have unmet dependencies:
 linux-signed-image-3.16.0-33-generic : Depends: linux-image-3.16.0-33-generic (= 3.16.0-33.44) but 3.16.0-33.44~14.04.1 is installed
 linux-signed-image-3.16.0-34-generic : Depends: linux-image-3.16.0-34-generic (= 3.16.0-34.47) but 3.16.0-34.47~14.04.1 is installed
 linux-signed-image-3.16.0-36-generic : Depends: linux-image-3.16.0-36-generic (= 3.16.0-36.48) but 3.16.0-36.48~14.04.1 is installed
 linux-signed-image-3.16.0-37-generic : Depends: linux-image-3.16.0-37-generic (= 3.16.0-37.51) but 3.16.0-37.51~14.04.1 is installed
 linux-signed-image-3.16.0-38-generic : Depends: linux-image-3.16.0-38-generic (= 3.16.0-38.52) but 3.16.0-38.52~14.04.1 is installed
E: Unmet dependencies. Try using -f.

The package system is broken

Check if you are using third-party repositories. If so, disable them, because they are a common source of problems.
Furthermore, run the following command in a Terminal: apt-get install -f

The following packages have unmet dependencies:

linux-signed-image-3.16.0-33-generic: Depends: linux-image-3.16.0-33-generic (= 3.16.0-33.44) but 3.16.0-33.44~14.04.1 is installed
                                      Depends: linux-image-extra-3.16.0-33-generic (= 3.16.0-33.44) but 3.16.0-33.44 is installed
linux-signed-image-3.16.0-34-generic: Depends: linux-image-3.16.0-34-generic (= 3.16.0-34.47) but 3.16.0-34.47~14.04.1 is installed
                                      Depends: linux-image-extra-3.16.0-34-generic (= 3.16.0-34.47) but 3.16.0-34.47 is installed
linux-signed-image-3.16.0-36-generic: Depends: linux-image-3.16.0-36-generic (= 3.16.0-36.48) but 3.16.0-36.48~14.04.1 is installed
                                      Depends: linux-image-extra-3.16.0-36-generic (= 3.16.0-36.48) but 3.16.0-36.48 is installed
linux-signed-image-3.16.0-37-generic: Depends: linux-image-3.16.0-37-generic (= 3.16.0-37.51) but 3.16.0-37.51~14.04.1 is installed
                                      Depends: linux-image-extra-3.16.0-37-generic (= 3.16.0-37.51) but 3.16.0-37.51 is installed
linux-signed-image-3.16.0-38-generic: Depends: linux-image-3.16.0-38-generic (= 3.16.0-38.52) but 3.16.0-38.52~14.04.1 is installed
                                      Depends: linux-image-extra-3.16.0-38-generic (= 3.16.0-38.52) but 3.16.0-38.52 is installed

请帮忙。

答案1

删除以下位置的所有文件/etc/apt/sources.list.d

mkdir ~/sources.list.d
sudo mv /etc/apt/sources.list.d ~/

消除

sudo mv /etc/apt/sources.list ~/

开始software-properties-gtk

gksudo software-properties-gtk

检查以下属性(抱歉我的截图太生动了)。这样,文件/etc/apt/sources.list就被重新创建了。

在此处输入图片描述

在此处输入图片描述

安装aptitude

sudo apt-get install aptitude

并运行

sudo aptitude install -f

并解决您的问题。

相关内容