运行命令时出现以下错误:
$ sudo apt-get clean && sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get autoclean -y && sudo apt-get autoremove -y
Hit:1 http://ppa.launchpad.net/remmina-ppa-team/remmina-next/ubuntu xenial InRelease
Hit:2 http://gb.archive.ubuntu.com/ubuntu xenial InRelease
Hit:3 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:4 http://gb.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:5 http://gb.archive.ubuntu.com/ubuntu xenial-backports InRelease
Hit:6 http://repository.spotify.com stable InRelease
Ign:7 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:8 https://packages.cisofy.com/community/lynis/deb xenial InRelease
Hit:9 https://download.virtualbox.org/virtualbox/debian xenial InRelease
Hit:10 https://download.sublimetext.com apt/stable/ InRelease
Hit:11 http://dl.google.com/linux/chrome/deb stable Release
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
libmm-glib0 libqmi-proxy modemmanager
The following packages will be upgraded:
avahi-dnsconfd
1 to upgrade, 0 to newly install, 0 to remove and 3 not to upgrade.
Need to get 14.1 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://gb.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 avahi-dnsconfd amd64 0.6.32~rc+dfsg-1ubuntu2.1 [14.1 kB]
Fetched 14.1 kB in 0s (168 kB/s)
dpkg: warning: files list file for package 'avahi-daemon' missing; assuming package has no files currently installed
(Reading database ... 280768 files and directories currently installed.)
Preparing to unpack .../avahi-dnsconfd_0.6.32~rc+dfsg-1ubuntu2.1_amd64.deb ...
Job for avahi-daemon.socket canceled.
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
Job for avahi-daemon.socket canceled.
dpkg: error processing archive /var/cache/apt/archives/avahi-dnsconfd_0.6.32~rc+dfsg-1ubuntu2.1_amd64.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/avahi-dnsconfd_0.6.32~rc+dfsg-1ubuntu2.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
我尝试了以下方法:
sudo apt-get -f install
sudo dpkg --configure -a
sudo rm /var/lib/dpkg/info/avahi-daemon.*
但这没有帮助。
信息:
$ uname -a
Linux mybox 4.13.0-38-generic #43~16.04.1-Ubuntu SMP Wed Mar 14 17:48:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
类似于:https ://bugs.debian.org/cgi-bin/bugreport.cgi?bug=768949
我能够通过这样做来修复我损坏的升级