apt-get upgrade 返回错误

apt-get upgrade 返回错误

我之前遇到过一个严重的问题,但最终得到了解决,请参考ssh 中未满足的依赖关系错误

现在系统看起来是一个健康、新鲜的 14.04 可信系统。只剩下一个问题。

运行后apt-get update,没有返回任何错误。当我运行时apt-get upgrade,它首先显示以下内容。

root@ubuntu:/# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
  apt apt-utils aptitude base-passwd byobu command-not-found cpp cpp-4.6 dconf-gsettings-backend docbook-xml dpkg fontconfig fontconfig-config
  foomatic-db-compressed-ppds gcc-4.6-base gcc-4.6-base:i386 gettext-base ghostscript grub-common grub-pc grub-pc-bin grub2-common install-info iputils-ping
  landscape-common language-pack-zh-hans language-pack-zh-hans-base language-pack-zh-hant language-pack-zh-hant-base lib32stdc++6 libasound2 libcairo2 libcupsimage2
  libdbd-mysql-perl libdbi-perl libfontconfig1 libgs9 libgs9-common libjpeg-progs libjpeg8 libjson0 liblocale-gettext-perl libmediainfo0 libnss3 libnss3-1d
  libpango1.0-0 libplymouth2 libpolkit-gobject-1-0 libquadmath0 libstdc++6 libstdc++6:i386 libsub-name-perl libtext-iconv-perl libuuid-perl libv4l-0 libxft2 libxml2
  linux-headers-generic linux-headers-server lsb-release man-db module-init-tools nvidia-common openjdk-6-jre-headless openprinting-ppds passwd perl perl-base
  perl-modules plymouth poppler-utils procps python-apport python-apt python-dbus python-debian python-keyring qemu-common sgml-base sgml-data ssh-import-id
  sysvinit-utils ttf-dejavu-core ttf-freefont ttf-kacst-one ttf-liberation ttf-unfonts-core ttf-wqy-microhei update-manager-core update-notifier-common upstart
  xml-core xz-utils
The following packages will be upgraded:
  app-install-data apt-xapian-index avahi-autoipd binutils ca-certificates cups-common doc-base dosfstools firefox-locale-zh-hans firefox-locale-zh-hant gnupg iproute
  iproute2 isc-dhcp-client isc-dhcp-common jhead lib32gcc1 libglib2.0-data libjbig2dec0 libpam-runtime linux-firmware linux-libc-dev locales lshw ltrace mime-support
  multiarch-support mysql-common net-tools openjdk-6-jre-lib os-prober patch policykit-desktop-privileges python-apt-common python-chardet python-crypto
  python-httplib2 python-launchpadlib python-lazr.restfulclient python-lazr.uri python-oauth python-openssl python-pexpect python-pkg-resources python-problem-report
  python-serial python-simplejson python-twisted-bin python-twisted-core python-wadllib python-xapian python-xdg python-zope.interface rsync seabios sensible-utils
  shared-mime-info sudo tcpdump udev unzip usbutils uuid-runtime vim vim-common vim-runtime vim-tiny w3m wget x11-common
70 upgraded, 0 newly installed, 0 to remove and 93 not upgraded.
67 not fully installed or removed.
Need to get 0 B/75.3 MB of archives.
After this operation, 64.7 MB of additional disk space will be used.
Do you want to continue [Y/n]?

回答之后Y,它进行了大量的输出、准备、解包等,但最终出现以下错误。

Unpacking replacement libxrender1 ...
Preparing to replace gpgv 1.4.16-1ubuntu2 (using .../gpgv_1.4.16-1ubuntu2.4_amd64.deb) ...
Unpacking replacement gpgv ...
Processing triggers for doc-base ...
Processing 2 changed doc-base files...
Registering documents with scrollkeeper...
Processing triggers for man-db ...
Errors were encountered while processing:
 /var/cache/apt/archives/udev_204-5ubuntu20.28_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

apt-get install openssh-client openssh-server如果我安装了普通软件(例如,运行良好),则不会出现任何错误。

此外,该错误抱怨有关 udev_204-5ubuntu20.28_amd64.deb,我在 packages.ubuntu.com 上检查过,对于 14.04 trusty,包应该是 udev_204-5ubuntu20.26_amd64.deb(版本上略有不同)。

谢谢,希望能给我指出一个正确的方向来解决这个问题(apt-get upgrade)。

问候, Denistone

答案1

尝试这个简单的解决方法:

sudo apt-get clean        
sudo dpkg --clear-avail    
sudo apt-get -f install

相关内容