分页: 1 / 1

软件更新器总是安装失败

发表于 : 2018-09-11 19:00
Leetroch
同时apt-get upgrade命令也总是返回错误。我曾经试过如下链接的方法,但是只是解决了部分软件的升级问题,还有一部分不能解决。ubuntu里边的新软件也不能安装,求大佬解答。

代码: 全选

lee@ubuntu:~$ sudo apt-get upgrade
[sudo] password for lee: 
对不起,请重试。
[sudo] password for lee: 
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
正在对升级进行计算... 完成
下列软件包是自动安装的并且现在不需要了:
  libqpdf13
Use 'apt-get autoremove' to remove it.
下列软件包的版本将保持不变:
  fish linux-generic-lts-xenial linux-headers-generic-lts-xenial
  linux-image-generic-lts-xenial
下列软件包将被升级:
  activity-log-manager activity-log-manager-control-center apt
  apt-transport-https apt-utils avahi-autoipd avahi-daemon avahi-utils dbus
  dbus-x11 desktop-file-utils dpkg-dev gnome-user-guide grub-common grub-pc
  grub-pc-bin grub2-common ifupdown initramfs-tools initramfs-tools-bin
  iproute iproute2 klibc-utils krb5-locales landscape-client-ui-install
  libapt-inst1.5 libavahi-client3 libavahi-common-data libavahi-common3
  libavahi-core7 libavahi-glib1 libavahi-gobject0 libdbus-1-3 libdpkg-perl
  libgssapi-krb5-2 libido3-0.1-0 libk5crypto3 libklibc libkrb5-3
  libkrb5support0 libmm-glib0 libnautilus-extension1a libplymouth2
  libqtshadowsocks libwhoopsie0 linux-libc-dev logrotate lshw makedev
  modemmanager nautilus nautilus-data open-vm-tools open-vm-tools-desktop
  oracle-java8-installer oracle-java8-set-default plymouth plymouth-label
  plymouth-theme-ubuntu-logo plymouth-theme-ubuntu-text python-apt
  python-apt-common python3-apt python3-software-properties
  python3-update-manager resolvconf rsyslog shadowsocks-qt5
  software-properties-common software-properties-gtk sogoupinyin
  unattended-upgrades update-manager update-manager-core update-notifier
  update-notifier-common whoopsie
升级了 77 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 4 个软件包未被升级。
有 1 个软件包没有被完全安装或卸载。
需要下载 31.1 MB/43.4 MB 的软件包。
解压缩后会消耗掉 3,756 kB 的额外空间。
您希望继续执行吗? [Y/n] y
获取:1 http://mirrors.163.com/ubuntu/ trusty-updates/main resolvconf all 1.69ubuntu1.4 [55.1 kB]
获取:2 http://archive.ubuntukylin.com:10006/ubuntukylin/ xenial/main sogoupinyin i386 2.2.0.0102 [22.9 MB]
获取:3 http://mirrors.163.com/ubuntu/ trusty-updates/main libdbus-1-3 i386 1.6.18-0ubuntu4.5 [132 kB]
获取:4 http://ppa.launchpad.net/hzwhuang/ss-qt5/ubuntu/ trusty/main libqtshadowsocks i386 1.11.0-1+201708032142~ubuntu14.04.1 [72.2 kB]
获取:5 http://mirrors.163.com/ubuntu/ trusty-updates/main klibc-utils i386 2.0.3-0ubuntu1.14.04.3 [104 kB]
获取:6 http://mirrors.163.com/ubuntu/ trusty-updates/main libklibc i386 2.0.3-0ubuntu1.14.04.3 [41.3 kB]
获取:7 http://mirrors.163.com/ubuntu/ trusty-updates/main libk5crypto3 i386 1.12+dfsg-2ubuntu5.3 [77.5 kB]
获取:8 http://mirrors.163.com/ubuntu/ trusty-updates/main libgssapi-krb5-2 i386 1.12+dfsg-2ubuntu5.3 [112 kB]
获取:9 http://mirrors.163.com/ubuntu/ trusty-updates/main libkrb5-3 i386 1.12+dfsg-2ubuntu5.3 [260 kB]
获取:10 http://mirrors.163.com/ubuntu/ trusty-updates/main libkrb5support0 i386 1.12+dfsg-2ubuntu5.3 [31.0 kB]
获取:11 http://mirrors.163.com/ubuntu/ trusty-updates/main libido3-0.1-0 i386 13.10.0+14.04.20170403-0ubuntu1 [48.4 kB]
获取:12 http://ppa.launchpad.net/hzwhuang/ss-qt5/ubuntu/ trusty/main shadowsocks-qt5 i386 2.9.0-1+201707231936~ubuntu14.04.1 [287 kB]
获取:13 http://mirrors.163.com/ubuntu/ trusty-updates/main libmm-glib0 i386 1.0.0-2ubuntu1.1 [127 kB]
获取:14 http://mirrors.163.com/ubuntu/ trusty-updates/main iproute2 i386 3.12.0-2ubuntu1.2 [396 kB]
获取:15 http://mirrors.163.com/ubuntu/ trusty-updates/main makedev all 2.3.1-93ubuntu2~ubuntu14.04.1 [24.5 kB]
获取:16 http://mirrors.163.com/ubuntu/ trusty-updates/main dbus i386 1.6.18-0ubuntu4.5 [234 kB]
获取:17 http://mirrors.163.com/ubuntu/ trusty-updates/main krb5-locales all 1.12+dfsg-2ubuntu5.3 [13.5 kB]
获取:18 http://mirrors.163.com/ubuntu/ trusty-updates/main lshw i386 02.16-2ubuntu1.4 [246 kB]
获取:19 http://mirrors.163.com/ubuntu/ trusty-updates/main activity-log-manager i386 0.9.7-0ubuntu14.2 [107 kB]
获取:20 http://mirrors.163.com/ubuntu/ trusty-updates/main activity-log-manager-control-center all 0.9.7-0ubuntu14.2 [1,694 B]
获取:21 http://mirrors.163.com/ubuntu/ trusty-updates/main desktop-file-utils i386 0.22-1ubuntu1.1 [42.5 kB]
获取:22 http://mirrors.163.com/ubuntu/ trusty-updates/main grub-pc i386 2.02~beta2-9ubuntu1.14 [174 kB]
获取:23 http://mirrors.163.com/ubuntu/ trusty-updates/main grub-pc-bin i386 2.02~beta2-9ubuntu1.14 [890 kB]
获取:24 http://mirrors.163.com/ubuntu/ trusty-updates/main grub2-common i386 2.02~beta2-9ubuntu1.14 [514 kB]
获取:25 http://mirrors.163.com/ubuntu/ trusty-updates/main grub-common i386 2.02~beta2-9ubuntu1.14 [1,675 kB]
获取:26 http://mirrors.163.com/ubuntu/ trusty-updates/main iproute all 1:3.12.0-2ubuntu1.2 [2,394 B]
获取:27 http://mirrors.163.com/ubuntu/ trusty-updates/main libnautilus-extension1a i386 1:3.10.1-0ubuntu9.11 [51.9 kB]
获取:28 http://mirrors.163.com/ubuntu/ trusty-updates/main whoopsie i386 0.2.24.6ubuntu4 [21.0 kB]
获取:29 http://mirrors.163.com/ubuntu/ trusty-updates/main libwhoopsie0 i386 0.2.24.6ubuntu4 [6,322 B]
获取:30 http://mirrors.163.com/ubuntu/ trusty-updates/main linux-libc-dev i386 3.13.0-158.208 [773 kB]
获取:31 http://mirrors.163.com/ubuntu/ trusty-updates/main modemmanager i386 1.0.0-2ubuntu1.1 [473 kB]
获取:32 http://mirrors.163.com/ubuntu/ trusty-updates/main nautilus-data all 1:3.10.1-0ubuntu9.11 [50.7 kB]
获取:33 http://mirrors.163.com/ubuntu/ trusty-updates/main nautilus i386 1:3.10.1-0ubuntu9.11 [485 kB]
获取:34 http://mirrors.163.com/ubuntu/ trusty-updates/main software-properties-common all 0.92.37.8 [9,384 B]
获取:35 http://mirrors.163.com/ubuntu/ trusty-updates/main software-properties-gtk all 0.92.37.8 [47.0 kB]
获取:36 http://mirrors.163.com/ubuntu/ trusty-updates/main unattended-upgrades all 0.82.1ubuntu2.5 [25.6 kB]
获取:37 http://mirrors.163.com/ubuntu/ trusty-updates/main python3-software-properties all 0.92.37.8 [19.2 kB]
获取:38 http://mirrors.163.com/ubuntu/ trusty-updates/main open-vm-tools-desktop i386 2:9.4.0-1280544-5ubuntu6.4 [120 kB]
获取:39 http://mirrors.163.com/ubuntu/ trusty-updates/main open-vm-tools i386 2:9.4.0-1280544-5ubuntu6.4 [458 kB]
下载 31.1 MB,耗时 29秒 (1,059 kB/s)                                           
正在从软件包中解出模板:100%
正在预设定软件包 ...
正在设置 install-info (5.2.0.dfsg.1-2) ...
/etc/environment: line 2: /usr/lib/jvm/java-8-oracle: Is a directory
dpkg: 处理软件包 install-info (--configure)时出错:
 子进程 已安装 post-installation 脚本 返回了错误号 126
在处理时有错误发生:
 install-info
E: Sub-process /usr/bin/dpkg returned an error code (1)

Re: 软件更新器总是安装失败

发表于 : 2018-09-11 22:07
astolia
这不是写了吗

代码: 全选

/etc/environment: line 2: /usr/lib/jvm/java-8-oracle: Is a directory
你安装java8时修改了/etc/environment文件,结果改错了搞出问题来了。
错误在第二行,具体要看了文件内容才知道

Re: 软件更新器总是安装失败

发表于 : 2018-09-24 14:23
Leetroch
astolia 写了:
2018-09-11 22:07
这不是写了吗

代码: 全选

/etc/environment: line 2: /usr/lib/jvm/java-8-oracle: Is a directory
你安装java8时修改了/etc/environment文件,结果改错了搞出问题来了。
错误在第二行,具体要看了文件内容才知道
请问是不是该把java8重新安装后才能解决问题。 :Adore

Re: 软件更新器总是安装失败

发表于 : 2018-09-24 19:24
astolia
Leetroch 写了:
2018-09-24 14:23
请问是不是该把java8重新安装后才能解决问题。 :Adore
这个跟java的安装没有关系。
我猜应该是你不知道从哪里看到的要在这个文件里设置JAVA_HOME环境变量,正确的写法是JAVA_HOME=/usr/lib/jvm/java-8-oracle,但你在=后面多加了空格,就搞出这个错误了。把文件内容改过来就行了。