每当我试图使用apt-get安装、卸载或更新软件时,我的Ubuntu系统就会给我带来麻烦。
每当我运行这些命令时,它都会返回一个有关我的status文件的错误。该文件的路径是/var/lib/dpkg/status。
我得到的错误如下:
dpkg: parse error, in file '/var/lib/dpkg/status' near line 95 package 'python-nova':
`Depends' field, invalid package name `python:any': character `:' not allowed (only letters, digits and characters `-+._')
E: Sub-process /usr/bin/dpkg returned an error code (2)有人能帮我解决我的问题吗?
lsb_release -a; uname -a; apt-cache policy python-nova的输出是:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty
Linux astanton-ws 3.19.0-26-generic #28~14.04.1-Ubuntu SMP Wed Aug 12 14:09:17 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
python-nova:
Installed: 1:2014.1.5-0ubuntu1.3
Candidate: 1:2014.1.5-0ubuntu1.4
Version table:
1:2014.1.5-0ubuntu1.4 0
500 http://ie.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
*** 1:2014.1.5-0ubuntu1.3 0
100 /var/lib/dpkg/status
1:2014.1.3-0ubuntu1.1 0
500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
1:2014.1-0ubuntu1 0
500 http://ie.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packagessed -n '80,97p' /var/lib/dpkg/status的输出是:
high performance Document Object Model (DOM) implementation. Additionally, it
supports using the XML Path Language (XPath) to find and extract information.
Homepage: https://metacpan.org/release/XML-LibXML/
Original-Maintainer: Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>
Package: python-nova
Status: install ok installed
Priority: extra
Section: python
Installed-Size: 38347
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: all
Source: nova
Version: 1:2014.1.5-0ubuntu1.3
Provides: python2.7-nova
Depends: openssh-client, openssl, python-amqplib (>= 0.6.1), python-anyjson (>= 0.3.3), python-babel, python-boto (>= 2.4.0), python-cinderclient (>= 1:1.0.5), python-eventlet (>= 0.13.0), python-glanceclient (>= 1:0.9.0), python-greenlet (>= 0.3.2), python-iso8601, python-jinja2, python-jsonschema (>= 1.3.0), python-keystoneclient (>= 1:0.3.2), python-kombu (>= 2.5.12), python-lxml (>= 2.3), python-m2crypto, python-migrate, python-netaddr (>= 0.7.6), python-neutronclient (>= 1:2.3.0), python-oslo.config (>= 1:1.2.0), python-paramiko (>= 1.8.0), python-paste, python-pastedeploy (>= 1.5.0), python-pyasn1, python-pycadf (>= 0.1.9), python-routes, python-simplejson, python-six (>= 1.5.2), python-sqlalchemy-ext (>= 0.7.8-1~) | python-sqlalchemy (<< 0.6.3-2), python-stevedore (>= 0.12), python-suds, python-webob (>= 1.2.3), sudo, python (>= 2.7), python (<< 2.8), python:any (>= 2.7.1-0ubuntu2), python-pbr, python-sqlalchemy (>= 0.8~), python-sqlalchemy (<< 0.9), python-oslo.rootwrap, python-oslo.messaging
Recommends: python-mysqldb
Suggests: python-ldap`发布于 2020-05-20 04:40:26
这是因为尝试使用一个非常古老的dpkg来使用新的.deb包,这些包使用了多个拱形功能。您应该尝试将dpkg升级到一个新的版本,该版本通常是从下一个版本开始,而不是直接跳转到最新版本,因为这往往是不受支持的。您可能需要手动修复dpkg状态文件,安装新的dpkg,然后重新安装任何需要损坏的包。
https://unix.stackexchange.com/questions/241842
复制相似问题