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升級)。

問候, 德尼斯頓

答案1

嘗試這個簡單的解決方法:

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

相關內容