apt-get 完全无法在 Ubuntu 14.04 LTS 上运行

apt-get 完全无法在 Ubuntu 14.04 LTS 上运行

每次我尝试 apt-get 时,它总是会失败。我无法安装、删除、更新、升级,甚至无法进行 dist-upgrade。当我尝试时, sudo apt-get update我收到以下消息:

E: Some index files failed to download. They have been ignored, or old ones used instead.

安装

E: Unmet dependencies.

apt-get 升级:

The following packages have unmet dependencies:  libc-dev-bin :
 nullDepends:  libc6 (> 2.22) but 2.19-0ubuntu6.6 is installed  libc-l10n :
 nullBreaks: locales (< 2.21-1)  libc6-dbg : Depends: libc6 (= 2.22-3) but
2.19-0ubuntu6.6 is installed  libc6-dev : Depends: libc6 (= 2.22-3) but 2.19-0ubuntu6.6 is installed  libc6-i386 : Depends: libc6 (=
2.22-3) but 2.19-0ubuntu6.6 is installed  plymouth : Depends: init-system-helpers (>= 1.18) but 1.14 is installed  plymouth-label :
 nullDepends: plymouth (= 0.8.8-0ubuntu17.1) but 0.9.2-3 is installed W:
 nullIgnoring Provides line with DepCompareOp for package libjpeg62 W:
 nullIgnoring Provides line with DepCompareOp for package
 nullphp-psr-http-message-implementation W: Ignoring Provides line with
 nullDepCompareOp for package php-psr-log-implementation W: Ignoring
 nullProvides line with DepCompareOp for package php-seclib W: Ignoring
 nullProvides line with DepCompareOp for package php-sabre-http W: Ignoring
 nullProvides line with DepCompareOp for package php-math-biginteger W:
 nullIgnoring Provides line with DepCompareOp for package pypy-cffi W:
 nullIgnoring Provides line with DepCompareOp for package
 nullpypy-cffi-backend-api-max W: Ignoring Provides line with DepCompareOp
 nullfor package pypy-cffi-backend-api-min W: Ignoring Provides line with
 nullDepCompareOp for package python-cffi-backend-api-max W: Ignoring
 nullProvides line with DepCompareOp for package
 nullpython-cffi-backend-api-min W: Ignoring Provides line with
 nullDepCompareOp for package python3-cffi-backend-api-max W: Ignoring
 nullProvides line with DepCompareOp for package
 nullpython3-cffi-backend-api-min W: Ignoring Provides line with
 nullDepCompareOp for package libjpeg62 W: Ignoring Provides line with
 nullDepCompareOp for package python-cffi-backend-api-max W: Ignoring
 nullProvides line with DepCompareOp for package
 nullpython-cffi-backend-api-min W: Ignoring Provides line with
 nullDepCompareOp for package python3-cffi-backend-api-max W: Ignoring
 nullProvides line with DepCompareOp for package
 nullpython3-cffi-backend-api-min W: You may want to run apt-get update to
 nullcorrect these problems E: Unmet dependencies. Try using -f.

答案1

打开软件并更新其他软件选项卡,取消勾选你认为不应该存在的任何存储库,比如,即使在你卸载它之后,wine 仍然在那里,或者你不需要这个存储库(小心不要删除,只是取消勾选,以防你将来某个时候再次需要它用于某些软件)关闭它,它会要求刷新取消它

sudo apt-get update

sudo apt-get install  -f

sudo apt-get dist-upgrade

您可以在终端中注释掉存储库,也可以编辑文件

sudo vim /etc/apt/sources.list

并评论你不需要的仓库

答案2

Apt-get 是 Ubuntu App Store 中可用的软件包(通常情况下已预安装)

您还可以下载其他各种可用的包管理器。Apt-get 只是一个用于下载包及其依赖项的包管理器。您可以使用很多包管理器。

编辑:我建议还下载 synpack - 一个 GUI 形式的包管理器,以防这种情况再次发生。

答案3

在您的/etc/apt/sources.list文件中,该行应如下所示:

deb http://archive.canonical.com/ubuntu trusty partner

如果该部分的格式错误,它将不起作用$(lsb_release -sc)

相关内容