我在更新软件时遇到了一些问题。似乎已经下载了新软件包,但有一个软件包给我带来了一些麻烦
这是我尝试升级软件包时得到的输出:
sudo apt-get upgrade
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:
E: Unmet dependencies. Try using -f.
sudo apt-get upgrade -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages have been kept back:
linux-generic-pae linux-headers-generic-pae linux-image-generic-pae
The following packages will be upgraded:
activity-log-manager-common activity-log-manager-control-center apport
apport-gtk apt-transport-https apt-utils bind9-host brasero brasero-cdrkit
brasero-common busybox-static checkbox checkbox-qt compiz compiz-core
compiz-gnome compiz-plugins-default cups-pk-helper deja-dup dhcp3-server
dkms dnsutils duplicity ffmpeg firefox firefox-globalmenu
firefox-gnome-support firefox-locale-en flashplugin-installer
fonts-opensymbol gdb gimp gimp-data gir1.2-networkmanager-1.0
gir1.2-telepathyglib-0.12 gnome-accessibility-themes gnome-control-center
gnome-control-center-data gnome-games-data gnome-settings-daemon
gnome-sudoku gnome-themes-standard gnomine grub-common grub-pc grub-pc-bin
grub2-common gstreamer0.10-pulseaudio gwibber gwibber-service
gwibber-service-facebook gwibber-service-identica gwibber-service-twitter
icedtea-6-jre-cacao icedtea-6-jre-jamvm icedtea-7-jre-cacao
icedtea-7-jre-jamvm indicator-messages indicator-status-provider-mc5
jockey-common jockey-gtk jupiter libbind9-80 libbrasero-media3-1
libdecoration0 libdns81 libfreerdp-plugins-standard libfreerdp1 libgimp2.0
libglu1-mesa libgnome-control-center1 libgwibber-gtk2 libgwibber2
libindicator-messages-status-provider1 libisc83 libisccc80 libisccfg82
liblightdm-gobject-1-0 liblwres80 libnautilus-extension1a libnm-glib-vpn1
liboverlay-scrollbar-0.2-0 liboverlay-scrollbar3-0.2-0 libpq5 libpurple-bin
libpurple0 libreoffice-emailmerge libreoffice-help-en-us
libreoffice-style-human libreoffice-style-tango libtelepathy-glib0
libunity-core-5.0-5 libupnp3 libvlc5 libvlccore5 light-themes linux-libc-dev
mahjongg make man-db mtp-tools nautilus nautilus-data openjdk-6-jre
openjdk-6-jre-headless openjdk-6-jre-lib openjdk-7-jre
openjdk-7-jre-headless openjdk-7-jre-lib openssl overlay-scrollbar
plymouth-theme-ubuntu-logo plymouth-theme-ubuntu-text pulseaudio
pulseaudio-module-bluetooth pulseaudio-module-gconf pulseaudio-module-x11
pulseaudio-utils python-apport python-keyring python-libproxy python-libxml2
python-problem-report python-ubuntu-sso-client seahorse skype skype-bin
software-center synaptic thunderbird thunderbird-globalmenu
thunderbird-gnome-support thunderbird-locale-en thunderbird-locale-en-us
transmission-common transmission-gtk ubuntu-desktop ubuntu-minimal
ubuntu-sso-client ubuntu-sso-client-gtk ubuntu-standard unattended-upgrades
unity unity-common unity-greeter unity-lens-applications unity-services vino
vlc vlc-data vlc-nox vlc-plugin-notify vlc-plugin-pulse xorg xserver-xorg
xserver-xorg-input-all xserver-xorg-video-all xserver-xorg-video-intel
xserver-xorg-video-qxl xul-ext-ubufox
160 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
1 not fully installed or removed.
Need to get 0 B/229 MB of archives.
After this operation, 12.1 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 90%dpkg: unrecoverable fatal error, aborting:
files list file for package 'linux-image-3.2.0-32-generic-pae' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error
该问题首先出现在尝试通过 Ubuntu 更新管理器进行升级时,它建议尝试从命令行使用 -f 选项。
我是否需要以某种方式清除已下载但未安装的软件包?看来 Linux 映像文件可能有问题。
答案1
您已将 中的元信息打乱/var/lib/dpkg/info
。这听起来不太好。
通过检查 的输出来检查 /var/ 是否未被填满df
。
恢复这种情况的一种方法是删除有问题的文件,然后重新安装该包。
cd /var/lib/dpkg/info
mv -f linux-image-3.2.0-32-generic-pae.* /tmp/
dpkg -i /var/cache/apt/archives/linux-image-3.2.0-32-generic-pae.deb
如果运气好的话,这是唯一的加密包,您可以重试apt-get install -f
。