ubuntu - `Depends' field, invalid package name `python3:any': character `
巴扎黑
巴扎黑 2017-04-21 11:17:55
0
1
1119

使用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/

巴扎黑
巴扎黑

모든 응답(1)
Peter_Zhu

어떤 버전의 Ubuntu를 사용하고 있나요? whereis python을 사용하여 시스템에 여러 개의 python이 설치되어 있는지 확인하세요. 로그를 보면 우분투는 기본적으로 python 2.7을 사용해야 합니다. 그러나 python3.0이 시스템에 설치되어 있으면 apt-get 파일을 편집하세요. 첫 번째 줄에 지정된 Python 버전은 Python 2.7을 가리킵니다

최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!