无法在 Ubuntu 16.04 上更新软件

无法在 Ubuntu 16.04 上更新软件

我正在使用 ubuntu 16.04,更新管理器要求自动频繁更新几个软件(查看附加的屏幕截图)。

几周以来,我无法选择任何软件进行更新(无法单击复选框,它被禁用)(检查所附的屏幕截图以获得更好的理解)

任何帮助都将不胜感激。在此处输入图片描述

更新:请检查以下update输出upgrade

root@vishal-ubuntu:~# sudo apt-get update
Hit:1 http://apt.postgresql.org/pub/repos/apt xenial-pgdg InRelease
Ign:2 http://linux.dropbox.com/ubuntu xenial InRelease                                    
Hit:3 http://ppa.launchpad.net/eugenesan/ppa/ubuntu xenial InRelease                      
Hit:4 http://ubuntu-archive.mirrors.estointernet.in xenial InRelease                                                                                      
Hit:5 http://ubuntu-archive.mirrors.estointernet.in xenial-updates InRelease                                                                              
Hit:6 http://ubuntu-archive.mirrors.estointernet.in xenial-backports InRelease                                                                            
Hit:7 http://ubuntu-archive.mirrors.estointernet.in xenial-security InRelease                                                                             
Hit:8 http://ppa.launchpad.net/linuxuprising/java/ubuntu xenial InRelease                                                           
Hit:9 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease                                                            
Get:10 http://linux.dropbox.com/ubuntu xenial Release [6,600 B]          
Hit:11 http://dl.google.com/linux/chrome/deb stable InRelease                  
Fetched 6,600 B in 1s (3,981 B/s)                         
Reading package lists... Done

root@vishal-ubuntu:~# sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  apt apt-transport-https apt-utils bind9-host ca-certificates dnsutils file firefox firefox-locale-en google-chrome-stable intel-microcode libapt-inst2.0 libapt-pkg5.0 libbind9-140 libdns-export162
  libdns162 libexif12 libfreerdp-cache1.1 libfreerdp-client1.1 libfreerdp-codec1.1 libfreerdp-common1.1.0 libfreerdp-core1.1 libfreerdp-crypto1.1 libfreerdp-gdi1.1 libfreerdp-locale1.1
  libfreerdp-plugins-standard libfreerdp-primitives1.1 libfreerdp-utils1.1 libisc-export160 libisc160 libisccc140 libisccfg140 libjpeg-turbo8 libjson-c2 libldap-2.4-2 liblwres141 libmagic1 libpq-dev
  libpq5 libprocps4 libpulse-mainloop-glib0 libpulse0 libpulsedsp libsnapd-glib1 libsqlite3-0 libssl-dev libssl-doc libssl1.0.0 libwinpr-crt0.1 libwinpr-dsparse0.1 libwinpr-environment0.1
  libwinpr-file0.1 libwinpr-handle0.1 libwinpr-heap0.1 libwinpr-input0.1 libwinpr-interlocked0.1 libwinpr-library0.1 libwinpr-path0.1 libwinpr-pool0.1 libwinpr-registry0.1 libwinpr-rpc0.1
  libwinpr-sspi0.1 libwinpr-synch0.1 libwinpr-sysinfo0.1 libwinpr-thread0.1 libwinpr-utils0.1 linux-generic-hwe-16.04 linux-generic-hwe-16.04-edge linux-headers-generic-hwe-16.04
  linux-headers-generic-hwe-16.04-edge linux-image-generic-hwe-16.04 linux-image-generic-hwe-16.04-edge linux-libc-dev linux-signed-generic-hwe-16.04 openssl postgresql-9.6 postgresql-client-9.6
  postgresql-client-common postgresql-common postgresql-contrib-9.6 procps pulseaudio pulseaudio-module-bluetooth pulseaudio-module-x11 pulseaudio-utils snapd snapd-xdg-open thunderbird
  thunderbird-gnome-support thunderbird-locale-en thunderbird-locale-en-us tzdata ubuntu-core-launcher
The following packages will be upgraded:
  libopenexr22 libp11-kit0 libproxy1-plugin-gsettings libproxy1-plugin-networkmanager libproxy1v5 p11-kit p11-kit-modules python-apt-common python3-apt update-notifier update-notifier-common
11 upgraded, 0 newly installed, 0 to remove and 93 not upgraded.
Need to get 1,029 kB/1,262 kB of archives.
After this operation, 212 kB disk space will be freed.
Do you want to continue? [Y/n] y
Get:1 http://ubuntu-archive.mirrors.estointernet.in xenial-updates/main amd64 update-notifier amd64 3.168.13 [47.5 kB]
Get:2 http://ubuntu-archive.mirrors.estointernet.in xenial-updates/main amd64 update-notifier-common all 3.168.13 [133 kB]
Get:3 http://ubuntu-archive.mirrors.estointernet.in xenial-updates/main amd64 p11-kit-modules amd64 0.23.2-5~ubuntu16.04.2 [73.7 kB]
Get:4 http://ubuntu-archive.mirrors.estointernet.in xenial-updates/main amd64 libp11-kit0 amd64 0.23.2-5~ubuntu16.04.2 [107 kB]
Get:5 http://ubuntu-archive.mirrors.estointernet.in xenial-updates/main amd64 libopenexr22 amd64 2.2.0-10ubuntu2.4 [593 kB]
Get:6 http://ubuntu-archive.mirrors.estointernet.in xenial-updates/main amd64 p11-kit amd64 0.23.2-5~ubuntu16.04.2 [75.0 kB]
Fetched 1,029 kB in 1s (975 kB/s)  
(Reading database ... 325147 files and directories currently installed.)
Preparing to unpack .../update-notifier_3.168.13_amd64.deb ...
Unpacking update-notifier (3.168.13) over (3.168.10) ...
Preparing to unpack .../python-apt-common_1.1.0~beta1ubuntu0.16.04.11_all.deb ...
Unpacking python-apt-common (1.1.0~beta1ubuntu0.16.04.11) over (1.1.0~beta1ubuntu0.16.04.10) ...
Preparing to unpack .../python3-apt_1.1.0~beta1ubuntu0.16.04.11_amd64.deb ...
Unpacking python3-apt (1.1.0~beta1ubuntu0.16.04.11) over (1.1.0~beta1ubuntu0.16.04.10) ...
Preparing to unpack .../update-notifier-common_3.168.13_all.deb ...
Unpacking update-notifier-common (3.168.13) over (3.168.10) ...
Preparing to unpack .../p11-kit-modules_0.23.2-5~ubuntu16.04.2_amd64.deb ...
Unpacking p11-kit-modules:amd64 (0.23.2-5~ubuntu16.04.2) over (0.23.2-5~ubuntu16.04.1) ...
Preparing to unpack .../libp11-kit0_0.23.2-5~ubuntu16.04.2_amd64.deb ...
Unpacking libp11-kit0:amd64 (0.23.2-5~ubuntu16.04.2) over (0.23.2-5~ubuntu16.04.1) ...
Preparing to unpack .../libopenexr22_2.2.0-10ubuntu2.4_amd64.deb ...
Unpacking libopenexr22:amd64 (2.2.0-10ubuntu2.4) over (2.2.0-10ubuntu2.3) ...
Preparing to unpack .../libproxy1-plugin-networkmanager_0.4.11-5ubuntu1.2_amd64.deb ...
Unpacking libproxy1-plugin-networkmanager:amd64 (0.4.11-5ubuntu1.2) over (0.4.11-5ubuntu1.1) ...
Preparing to unpack .../libproxy1-plugin-gsettings_0.4.11-5ubuntu1.2_amd64.deb ...
Unpacking libproxy1-plugin-gsettings:amd64 (0.4.11-5ubuntu1.2) over (0.4.11-5ubuntu1.1) ...
Preparing to unpack .../libproxy1v5_0.4.11-5ubuntu1.2_amd64.deb ...
Unpacking libproxy1v5:amd64 (0.4.11-5ubuntu1.2) over (0.4.11-5ubuntu1.1) ...
Preparing to unpack .../p11-kit_0.23.2-5~ubuntu16.04.2_amd64.deb ...
Unpacking p11-kit (0.23.2-5~ubuntu16.04.2) over (0.23.2-5~ubuntu16.04.1) ...
Processing triggers for gconf2 (3.2.6-3ubuntu6) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1.1) ...
Processing triggers for libglib2.0-0:amd64 (2.48.2-0ubuntu4.6) ...
Processing triggers for libc-bin (2.23-0ubuntu11.2) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up python-apt-common (1.1.0~beta1ubuntu0.16.04.11) ...
Setting up python3-apt (1.1.0~beta1ubuntu0.16.04.11) ...
Setting up update-notifier-common (3.168.13) ...
Setting up update-notifier (3.168.13) ...
Setting up libp11-kit0:amd64 (0.23.2-5~ubuntu16.04.2) ...
Setting up p11-kit-modules:amd64 (0.23.2-5~ubuntu16.04.2) ...
Setting up libopenexr22:amd64 (2.2.0-10ubuntu2.4) ...
Setting up libproxy1v5:amd64 (0.4.11-5ubuntu1.2) ...
Setting up libproxy1-plugin-networkmanager:amd64 (0.4.11-5ubuntu1.2) ...
Setting up libproxy1-plugin-gsettings:amd64 (0.4.11-5ubuntu1.2) ...
Setting up p11-kit (0.23.2-5~ubuntu16.04.2) ...
Processing triggers for libc-bin (2.23-0ubuntu11.2) ...

upgrade请注意,当我第一次启动计算机时, 会出现以下弹出窗口在此处输入图片描述

更新-2

root@vishal-ubuntu:~# sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  apt apt-transport-https apt-utils bind9-host ca-certificates dnsutils file firefox firefox-locale-en google-chrome-stable intel-microcode libapt-inst2.0 libapt-pkg5.0 libbind9-140 libdns-export162
  libdns162 libexif12 libfreerdp-cache1.1 libfreerdp-client1.1 libfreerdp-codec1.1 libfreerdp-common1.1.0 libfreerdp-core1.1 libfreerdp-crypto1.1 libfreerdp-gdi1.1 libfreerdp-locale1.1
  libfreerdp-plugins-standard libfreerdp-primitives1.1 libfreerdp-utils1.1 libisc-export160 libisc160 libisccc140 libisccfg140 libjpeg-turbo8 libjson-c2 libldap-2.4-2 liblwres141 libmagic1 libpq-dev
  libpq5 libprocps4 libpulse-mainloop-glib0 libpulse0 libpulsedsp libsnapd-glib1 libsqlite3-0 libssl-dev libssl-doc libssl1.0.0 libwinpr-crt0.1 libwinpr-dsparse0.1 libwinpr-environment0.1
  libwinpr-file0.1 libwinpr-handle0.1 libwinpr-heap0.1 libwinpr-input0.1 libwinpr-interlocked0.1 libwinpr-library0.1 libwinpr-path0.1 libwinpr-pool0.1 libwinpr-registry0.1 libwinpr-rpc0.1
  libwinpr-sspi0.1 libwinpr-synch0.1 libwinpr-sysinfo0.1 libwinpr-thread0.1 libwinpr-utils0.1 linux-generic-hwe-16.04 linux-generic-hwe-16.04-edge linux-headers-generic-hwe-16.04
  linux-headers-generic-hwe-16.04-edge linux-image-generic-hwe-16.04 linux-image-generic-hwe-16.04-edge linux-libc-dev linux-signed-generic-hwe-16.04 openssl postgresql-9.6 postgresql-client-9.6
  postgresql-client-common postgresql-common postgresql-contrib-9.6 procps pulseaudio pulseaudio-module-bluetooth pulseaudio-module-x11 pulseaudio-utils snapd snapd-xdg-open thunderbird
  thunderbird-gnome-support thunderbird-locale-en thunderbird-locale-en-us tzdata ubuntu-core-launcher
0 upgraded, 0 newly installed, 0 to remove and 93 not upgraded.
root@vishal-ubuntu:~# ls -l /var/crash
total 312
-rw------- 1 root whoopsie 315499 Dec 31 19:46 oracle-java11-installer-local.0.crash

答案1

在我看来,问题似乎出在版本不兼容的软件包上,很可能位于保留软件包列表的某个地方。

包 X 需要依赖项 A.1,但其余包组需要依赖项 A.2。

由于 apt 无法同时安装 A.1 和 A.2,因此它无法更新任何列出的软件包。

  1. 修复该问题的最简单方法是搜索您的记忆:问题出现前您安装的最后一个程序可能是程序包 X 的罪魁祸首。卸载它,看看是否能解决问题。

    • 使用您的 apt 历史记录登录来/var/log/apt查看您的安装历史记录并帮助您记忆。
  2. 更繁琐的方法是运行apt-cache policy <packagename>列出的每个软件包,查找软件包的来源。软件包 X 的罪魁祸首是那些不是来自官方 Ubuntu 存储库的软件包,或者来自错误版本的存储库。

    • Ubuntu 存储库中的软件包包括具体来说经过测试以防止此类问题。
  3. aptitude软件包提供的应用程序具有aptitude可视化求解器,可帮助识别有问题的软件包 X,并建议替代解决方案。您可能能够安装,也可能不能安装aptitude

  4. 请记住,您的 Ubuntu (16.04) 版本很快就会结束社区支持(2021 年 4 月),因此花费大量精力可能不值得。另一种选择是开始将您的数据迁移到全新安装的 Ubuntu 18.04 或 20.04 系统。

答案2

我发布我的答案是因为它可能对其他人有帮助。我在这里找到了非常简单的解决方案https://askubuntu.com/a/602/286126--> “谨慎的解决方案 2:”

效果很好

相关内容