几天前,当我尝试“更新”和“升级”时,我开始遇到这个突然的问题,这与 apt-repository 中的包索引文件损坏有关,我一直无法弄清楚;这里,以下是命令行上的输出:
$ sudo apt-get upgrade
[sudo] password for adarshc:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
linux-headers-generic-lts-raring linux-image-generic-lts-raring
The following packages will be upgraded:
accountsservice apt apt-transport-https apt-utils avahi-autoipd avahi-daemon avahi-utils base-files bc bind9-host chromium-browser
chromium-browser-l10n chromium-codecs-ffmpeg consolekit dc dnsutils duplicity firefox firefox-locale-en flashplugin-installer fonts-opensymbol gdm
gir1.2-accountsservice-1.0 gir1.2-appindicator3-0.1 gir1.2-gtk-3.0 gnome-control-center gnome-control-center-data gnome-desktop3-data
gnome-tweak-tool gnupg gpgv grub-common grub-pc grub-pc-bin grub2-common iproute landscape-client-ui-install language-pack-en
language-pack-en-base language-pack-gnome-en language-pack-gnome-en-base libaccountsservice0 libappindicator1 libappindicator3-1 libapt-inst1.4
libapt-pkg4.12 libavahi-client3 libavahi-common-data libavahi-common3 libavahi-core7 libavahi-glib1 libavahi-gobject0 libavahi-ui-gtk3-0
libbind9-80 libcec2 libck-connector0 libcurl3 libcurl3-gnutls libcurl3-nss libdjvulibre-text libdjvulibre21 libdns81 libdrm-intel1
libdrm-nouveau1a libdrm-nouveau2 libdrm-radeon1 libdrm2 libgail-3-0 libglu1-mesa libgnome-control-center1 libgnome-desktop-3-2 libgtk-3-0
libgtk-3-bin libgtk-3-common libisc83 libisccc80 libisccfg82 libjpeg-turbo8 liblwres80 libnfs1 libnss3 libnss3-1d libpam-ck-connector
libpixman-1-0 libqt4-dbus libqt4-declarative libqt4-network libqt4-opengl libqt4-script libqt4-sql libqt4-sql-sqlite libqt4-svg libqt4-xml
libqt4-xmlpatterns libqtcore4 libqtgui4 libreoffice-base-core libreoffice-calc libreoffice-common libreoffice-core libreoffice-draw
libreoffice-emailmerge libreoffice-gnome libreoffice-gtk libreoffice-help-en-us libreoffice-impress libreoffice-math libreoffice-style-human
libreoffice-style-tango libreoffice-writer libsmbclient libssl1.0.0 libunity-2d-private0 libunity-core-5.0-5 libwbclient0 libxfixes3 libxfont1
libxi6 linux-firmware linux-generic-lts-raring linux-libc-dev openssl pm-utils python-appindicator python-software-properties python-uno qdbus rar
rsyslog samba-common samba-common-bin smbclient software-center software-properties-common software-properties-gtk thunderbird
thunderbird-globalmenu thunderbird-gnome-support ubuntu-tweak unity unity-2d unity-2d-common unity-2d-panel unity-2d-shell unity-2d-spread
unity-common unity-services uno-libs3 ure xbmc-bin xbmc-pvr-argustv xbmc-pvr-dvbviewer xbmc-pvr-mediaportal-tvserver xbmc-pvr-mythtv-cmyth
xbmc-pvr-nextpvr xbmc-pvr-njoy xbmc-pvr-tvheadend-hts xbmc-pvr-vdr-vnsi xbmc-pvr-vuplus
159 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
E: The package index files are corrupted. No Filename: field for package gnome-tweak-tool.
答案1
以下步骤可以解决您的问题。
这将清除下载的档案
sudo apt-get clean
这将检查可用的最新软件包和更新
sudo apt-get update
这将推动 apt 更新所有可用的软件包
sudo apt-get dist-upgrade
希望这可以帮助!
答案2
也许先这样做:
sudo apt-get update