首页 > `Depends' field, invalid package name `python3:any': character `

`Depends' field, invalid package name `python3:any': character `

使用ubuntu apt-get check检查然间安装问题,提示让我使用apt-get -f install解决一些安装包的依赖问题。
sudo apt-get check
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
apt-transport-https : Depends: libapt-pkg4.10 but it is not installable
command-not-found : Depends: python3-commandnotfound (>= 0.3ubuntu7) but it is not installed
libept1 : Depends: libapt-pkg4.10 but it is not installable
lsb-release : Depends: python (< 2.7) but 2.7.5-5ubuntu3 is installed
python-apt : Depends: libapt-inst1.2 (>= 0.8.11) but it is not installable
Depends: libapt-pkg4.10 (>= 0.9.11) but it is not installable
python-cairo : Depends: python (< 2.7) but 2.7.5-5ubuntu3 is installed
python-dbus : Depends: python (< 2.7) but 2.7.5-5ubuntu3 is installed
python-dbus-dev : Breaks: python-dbus (< 1.0) but 0.83.0-1ubuntu3 is installed
python-gobject : Depends: python-gi (>= 3.12.0-1ubuntu1) but it is not installed
Depends: python-gobject-2 but it is not installed
ufw : Depends: python (< 2.7) but 2.7.5-5ubuntu3 is installed
update-manager-core : Depends: python (< 2.7) but 2.7.5-5ubuntu3 is installed
E: Unmet dependencies. Try using -f.

于是我就执行了apt-get -f install,结果提示了更多的问题,其中出现比较多的就是这种非法字符的问题。

After this operation, 1,373 kB of additional disk space will be used.

Do you want to continue? [Y/n] Y
Preconfiguring packages ...
dpkg: error processing /var/cache/apt/archives/lsb-release_4.1+Debian11ubuntu6_all.deb (--unpack):
parse error, in file '/var/lib/dpkg/tmp.ci/control' near line 7 package 'lsb-release':
Depends' field, invalid package namepython3:any': character :' not allowed (only letters, digits and characters-+.')
dpkg: error processing /var/cache/apt/archives/python3-commandnotfound_0.3ubuntu12_all.deb (--unpack):
parse error, in file '/var/lib/dpkg/tmp.ci/control' near line 7 package 'python3-commandnotfound':
Depends' field, invalid package namepython3:any': character :' not allowed (only letters, digits and characters-+.
')
dpkg: error processing /var/cache/apt/archives/ufw_0.34~rc-0ubuntu2_all.deb (--unpack):
parse error, in file '/var/lib/dpkg/tmp.ci/control' near line 6 package 'ufw':
Depends' field, invalid package namepython3:any': character :' not allowed (only letters, digits and characters-+.')
dpkg: error processing /var/cache/apt/archives/python-cairo_1.8.8-1ubuntu5_amd64.deb (--unpack):
parse error, in file '/var/lib/dpkg/tmp.ci/control' near line 7 package 'python-cairo':
Depends' field, invalid package namepython:any': character :' not allowed (only letters, digits and characters-+.
')
dpkg: error processing /var/cache/apt/archives/python3-distupgrade_1%3a0.220.7_all.deb (--unpack):
parse error, in file '/var/lib/dpkg/tmp.ci/control' near line 7 package 'python3-distupgrade':
Depends' field, invalid package namepython3:any': character :' not allowed (only letters, digits and characters-+._')

我在网上搜索过,把安装包下载下来,解压缩,修改依赖,然后重新打包安装是可以解决这个问题,可是目前有好几十个包都有这样的问题,一个个的修复不是解决办法。

而且以前安装的也都是这些软件包,依赖里面都有这样的字符,为什么我现在却遇到了这个问题,有没有其他的解决方法?

第一次更新16:50:
:any的问题目前已经找到决绝的方法了,需要更新一下dpkg的版本,早期版本不支持:any这样的匹配符,到1.6以上应该就可以了。
到 http://mirrors.aliyun.com/ubuntu/ubuntu/ubuntu/pool/main/d/dpkg/ 这里找合适的版本然后安装上

参考文档:http://mirrors.aliyun.com/ubuntu/ubuntu/ubuntu/pool/main/d/dpkg/


你Ubuntu 是什么版本的 ? 用whereis python 看看你系统里是不是装了多个python 从log上来看 你的ubuntu应该是default 用的2.7的python 但是你系统里装了python3.0 那你就编辑下apt-get这个文件 把第一行指定的python版本指向2.7的python

【热门文章】
【热门文章】