Instalação do pacote: erro de análise do dpkg

2

Sempre que tento instalar novos pacotes usando sudo apt-get install *package* , recebo o seguinte erro:

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)

Alguém pode me fornecer etapas para resolver isso?

Quando eu digitei head -100 /var/lib/dpkg/status | tail -10 , recebi:

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
Conflicts: python-cjson
Description: OpenStack Compute Python libraries
 OpenStack is a reliable cloud infrastructure. Its mission is to produce
    
por Antoin Stanton 16.10.2015 / 16:36

1 resposta

1

De alguma forma, seu /var/lib/dpkg/status foi corrompido.

Você poderia

  1. Tente editar o arquivo e corrigi-lo manualmente.

  2. Experimente esta solução no link

Recover package selection data

If /var/lib/dpkg/status becomes broken for any reason, the Debian system loses package selection data and suffers severely. Look for the old /var/lib/dpkg/status file at /var/lib/dpkg/status-old or /var/backups/dpkg.status.*.

Keeping /var/backups/ in a separate partition may be a good idea since this directory contains lots of important system data.

If the old /var/lib/dpkg/status file is not available, you can still recover information from directories in /usr/share/doc/.

# ls /usr/share/doc | \
  grep -v [A-Z] | \
  grep -v '^texmf$' | \
  grep -v '^debian$' | \
  awk '{print $1 " install"}' | \
  dpkg --set-selections

# dselect --expert # reinstall system, de-select as needed
    
por 16.10.2015 / 16:46