在 debian scrap 中运行 apt-get -f install 时出现依赖错误

在 debian scrap 中运行 apt-get -f install 时出现依赖错误

我无法在 Debian 中安装或删除软件包。当我输入apt-get -f install来解决问题时,我收到此错误:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
 libgmp3c2 libpython2.6 libssl-dev python-gnupginterface python2.6-dev zlib1g-dev
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
    python-pkg-resources python-setuptools
    Suggested packages:
  python-distribute-doc
The following packages will be upgraded:
  python-pkg-resources python-setuptools
2 upgraded, 0 newly installed, 0 to remove and 190 not upgraded.
1 not fully installed or removed.
Need to get 0 B/323 kB of archives.
After this operation, 989 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Reading changelogs... Done
dpkg: error processing /var/cache/apt/archives/python-setuptools_3.4.1-1_all.deb (--unpack):
 parse error, in file '/var/lib/dpkg/tmp.ci/control' near line 6 package 'python-setuptools':
`Depends' field, invalid package name `python:any': character `:' not allowed (only letters, digits and characters `-+._')
dpkg: error processing /var/cache/apt/archives/python-pkg-resources_3.4.1-1_all.deb (--unpack):
 parse error, in file '/var/lib/dpkg/tmp.ci/control' near line 7 package 'python-pkg-resources':
 `Depends' field, invalid package name `python:any': character `:' not  allowed (only letters, digits and characters `-+._')
Errors were encountered while processing:
 /var/cache/apt/archives/python-setuptools_3.4.1-1_all.deb
 /var/cache/apt/archives/python-pkg-resources_3.4.1-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

我已经搜索了很多但无法解决这个问题。

答案1

我遇到了同样的问题,直到我将以下 3 个软件包更新到相同版本:dpkg, dpkg-dev,libdpkg-perl

在此之前,我混合使用了 1.15 和 1.16 版本。我将所有 3 个软件包更新至 1.17。

答案2

你尝试过跑步吗?

apt-get clean

清除检索到的包文件的本地存储库。它会从 /var/cache/apt/archives/ 和 /var/cache/apt/archives/partial/ 中删除除锁定文件之外的所有内容。

相关内容