![由于 dpkg 错误,我无法安装任何 openstack 包,我该怎么办?](https://linux22.com/image/1103333/%E7%94%B1%E4%BA%8E%20dpkg%20%E9%94%99%E8%AF%AF%EF%BC%8C%E6%88%91%E6%97%A0%E6%B3%95%E5%AE%89%E8%A3%85%E4%BB%BB%E4%BD%95%20openstack%20%E5%8C%85%EF%BC%8C%E6%88%91%E8%AF%A5%E6%80%8E%E4%B9%88%E5%8A%9E%EF%BC%9F.png)
dpkg: error: parsing file '/var/lib/dpkg/status' near line 41363 package 'openstack-dashboard':
'Depends' field, missing architecture name, or garbage where architecture name expected
E: Sub-process /usr/bin/dpkg returned an error code (2)
Status of /var/lib/dpkg/status
Package: openstack-dashboard
Status: install ok half-configured
Priority: extra
Section: net
Installed-Size: 15121
Maintainer: Chuck Short <[email protected]>
Architecture: all
Source: horizon
Version: 1:2014.2-0ubuntu1~cloud0
Config-Version: 1:2014.2-0ubuntu1~cloud0
Depends: adduser, apache2 | httpd, libapache2-mod-wsgi (>= 2.3), python-django-horizon (= 1:2014.2-0ubuntu1~cloud0), python: (>= 2.7.1-0ubuntu2)
Pre-Depends: dpkg (>= 1.15.7.2)
答案1
那里可能可能是包本身有错误,但这种情况不太可能发生。
卸载并清除包:
sudo apt-get remove --purge openstack-dashboard
然后运行:
sudo apt-get autoclean
sudo apt-get check
然后尝试通过以下方式再次安装
sudo apt-get install openstack-dashboard