无法使用 apt-get 在 ubuntu 14.10 上安装任何内容,提示软件包 'libgnutls-deb0-28:amd64' 的文件列表文件缺少最后的换行符

无法使用 apt-get 在 ubuntu 14.10 上安装任何内容,提示软件包 'libgnutls-deb0-28:amd64' 的文件列表文件缺少最后的换行符

当我尝试使用 apt-get 安装任何东西时,它都显示同样的错误,我刚刚安装的所有内容都还没有安装

user@system:~$ sudo apt-get install git
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  git-man liberror-perl
Suggested packages:
  git-daemon-run git-daemon-sysvinit git-doc git-el git-email git-gui gitk
  gitweb git-arch git-cvs git-mediawiki git-svn
The following NEW packages will be installed:
  git git-man liberror-perl
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/3,019 kB of archives.
After this operation, 22.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Selecting previously unselected package liberror-perl.
dpkg: unrecoverable fatal error, aborting:
 files list file for package 'libgnutls-deb0-28:amd64' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)
user@system:~$ 

试图清除其返回的包

    sudo apt-get purge libgnutls-deb0-28 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 gnome-icon-theme : Depends: libgtk-3-bin
                    Depends: humanity-icon-theme but it is not going to be installed or
                             gnome-icon-theme-full but it is not going to be installed
 hud : Depends: libqt5gui5 (>= 5.0.2) but it is not going to be installed or
                libqt5gui5-gles (>= 5.0.2) but it is not going to be installed
 ibus : Depends: gir1.2-gtk-3.0 (>= 3.8.5) but it is not going to be installed
        Depends: python-notify but it is not going to be installed
        Depends: libgtk2.0-0 (>= 2.24.5-4) but it is not going to be installed
        Recommends: ibus-gtk but it is not going to be installed or
                    ibus-qt4 but it is not going to be installed or
                    libqt5gui5 but it is not going to be installed
        Recommends: ibus-gtk3 but it is not going to be installed or
                    ibus-qt4 but it is not going to be installed or
                    libqt5gui5 but it is not going to be installed
 libcheese-gtk23 : Depends: libcheese7 (>= 3.4.0) but it is not going to be installed
                   Depends: gstreamer1.0-clutter but it is not going to be installed
 libcups2 : Depends: libgnutls-deb0-28 (>= 3.2.10-0) but it is not going to be installed
 libcurl3-gnutls : Depends: libgnutls-deb0-28 (>= 3.2.10-0) but it is not going to be installed
                   Depends: libldap-2.4-2 (>= 2.4.7) but it is not going to be installed
                   Depends: librtmp1 (>= 2.4+20131018.git79459a2-3~) but it is not going to be installed
 libonline-accounts-client1 : Depends: libqt5gui5 (>= 5.0.2) but it is not going to be installed or
                                       libqt5gui5-gles (>= 5.0.2) but it is not going to be installed
 libpoppler-qt5-1 : Depends: libqt5gui5 (>= 5.0.2) but it is not going to be installed or
                             libqt5gui5-gles (>= 5.0.2) but it is not going to be installed
 libqmenumodel0 : Depends: libqt5gui5 (>= 5.0.2) but it is not going to be installed or
                           libqt5gui5-gles (>= 5.0.2) but it is not going to be installed
 libqt5multimedia5 : Depends: libqt5gui5 (>= 5.0.2) but it is not going to be installed or
                              libqt5gui5-gles (>= 5.0.2) but it is not going to be installed
 libqt5multimediawidgets5 : Depends: libqt5gui5 (>= 5.0.2) but it is not going to be installed or
                                     libqt5gui5-gles (>= 5.0.2) but it is not going to be installed
 libqt5opengl5 : Depends: libqt5gui5 (>= 5.3.0) but it is not going to be installed or
                          libqt5gui5-gles (>= 5.3.0) but it is not going to be installed
 libqt5quick5-gles : Depends: libqt5gui5 (>= 5.3.0) but it is not going to be installed or
                              libqt5gui5-gles (>= 5.3.0) but it is not going to be installed
 libqt5svg5 : Depends: libqt5gui5 (>= 5.3.0) but it is not going to be installed or
                       libqt5gui5-gles (>= 5.3.0) but it is not going to be installed
 libqt5widgets5 : Depends: libqt5gui5 (>= 5.3.0) but it is not going to be installed or
                           libqt5gui5-gles (>= 5.3.0) but it is not going to be installed
 libsoup2.4-1 : Depends: glib-networking (>= 2.32.0) but it is not going to be installed
 qml-module-qtmultimedia : Depends: libqt5multimedia5-plugins but it is not going to be installed
                           Depends: libqt5gui5 (>= 5.0.2) but it is not going to be installed or
                                    libqt5gui5-gles (>= 5.0.2) but it is not going to be installed
                           Depends: libqt5multimediaquick-p5 (>= 5.3.0) but it is not going to be installed
 qml-module-qtorganizer : Depends: libqt5gui5 (>= 5.0.2) but it is not going to be installed or
                                   libqt5gui5-gles (>= 5.0.2) but it is not going to be installed
 qml-module-qtquick-dialogs : Depends: libqt5gui5 (>= 5.3.0) but it is not going to be installed or
                                       libqt5gui5-gles (>= 5.3.0) but it is not going to be installed
 qml-module-qtquick-layouts : Depends: libqt5gui5 (>= 5.3.0) but it is not going to be installed or
                                       libqt5gui5-gles (>= 5.3.0) but it is not going to be installed
 qml-module-qtquick-particles2 : Depends: libqt5quickparticles5 (>= 5.2.1) but it is not going to be installed or
                                          libqt5quickparticles5-gles (>= 5.2.1) but it is not going to be installed
 qml-module-qtquick-privatewidgets : Depends: libqt5gui5 (>= 5.3.0) but it is not going to be installed or
                                              libqt5gui5-gles (>= 5.3.0) but it is not going to be installed
 qtcontact5-galera : Depends: address-book-service (= 0.1.1+14.10.20140930-0ubuntu1) but it is not going to be installed
 qtdeclarative5-qtlocation-plugin : Depends: libqt5location5-plugins but it is not going to be installed
                                    Depends: libqt53d5 (>= 5.0~git20130731) but it is not going to be installed or
                                             libqt53d5-gles (>= 5.0~git20130731) but it is not going to be installed
                                    Depends: libqt5gui5 (>= 5.0.2) but it is not going to be installed or
                                             libqt5gui5-gles (>= 5.0.2) but it is not going to be installed
                                    Depends: libqt5location5 (>= 5.3.0) but it is not going to be installed or
                                             libqt5location5-gles (>= 5.3.0) but it is not going to be installed
 qtdeclarative5-qtmir-plugin : Depends: libqt5gui5 (>= 5.3.0) but it is not going to be installed or
                                        libqt5gui5-gles (>= 5.3.0) but it is not going to be installed
                               Depends: qtmir-desktop but it is not going to be installed or
                                        qtmir-android but it is not going to be installed
 qtdeclarative5-ubuntu-content1 : Depends: libqt5gui5 (>= 5.0.2) but it is not going to be installed or
                                           libqt5gui5-gles (>= 5.0.2) but it is not going to be installed
 qtdeclarative5-ubuntu-telephony0.1 : Depends: telephony-service (>= 0.1+14.10.20141007.1-0ubuntu1)
 qtdeclarative5-ubuntu-ui-toolkit-plugin : Depends: libqt5gui5 (>= 5.0.2) but it is not going to be installed or
                                                    libqt5gui5-gles (>= 5.0.2) but it is not going to be installed
 signon-ui : Depends: signon-ui-x11 but it is not going to be installed or
                      ubuntu-system-settings-online-accounts (>= 0.4) but it is not going to be installed
 system-config-printer-gnome : Depends: system-config-printer-common (>= 1.3.11+20120807-0ubuntu7) but it is not going to be installed
                               Depends: python3-pycurl but it is not going to be installed
                               Depends: gir1.2-gtk-3.0 but it is not going to be installed
 unity-scope-mediascanner2 : Depends: libnet-cpp1 (>= 1.1.0+14.10.20140804) but it is not going to be installed
 unity8 : Depends: unity8-common (= 8.00+14.10.20141013.2-0ubuntu1) but it is not going to be installed
          Depends: libqt5gui5 (>= 5.0.2) but it is not going to be installed or
                   libqt5gui5-gles (>= 5.0.2) but it is not going to be installed
          Recommends: unity-scope-click but it is not going to be installed
 unity8-private : Depends: libqt5gui5 (>= 5.0.2) but it is not going to be installed or
                           libqt5gui5-gles (>= 5.0.2) but it is not going to be installed
                  Depends: libusermetricsoutput1 (>= 1.0.1) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

我是 ubuntu 新手,所以我无法理解到底该怎么用它

答案1

尝试使用以下命令修复软件包

sudo dpkg --configure -a
sudo apt-get clean
sudo apt-get update

更新:试试这个sudo apt-get -f install

APT 将尝试下载并安装缺失的软件包以解决依赖关系

你看到了吗问题

答案2

尝试这个:

sudo apt-get -f 更新

更新:

我的错!我本想让你尝试一下这个:sudo apt-get -f install

这个想法是让apt-get我们有机会尝试修复系统(如果可能的话)。但看起来,您已经尝试过了,但问题并没有解决。启用了哪些存储库?

另外,您是否尝试过删除有问题的软件包?我会尝试这个:

sudo apt-get purge libgnutls-openssl27:amd64

相关内容