Ubuntu 16.04 LTS 升级/安装问题

Ubuntu 16.04 LTS 升级/安装问题

我是 Ubuntu 的新手,最近几天,每当我尝试升级到新更新时,我都会遇到这个升级问题,只要我单击安装更新,它就会启动该过程,然后最终显示错误消息“包操作失败”,其中一个非常常见的是:

E: Sub-process /usr/bin/dpkg returned an error code (1)

我尝试在这里检查这个问题,并发现一篇询问类似问题的帖子这里

那里建议我应该在终端中运行以下代码:

sudo rm /var/crash/*

我这样做了,现在我没有看到显示检测到系统程序问题的弹出窗口,但似乎“错误代码 (1)”问题仍然存在。今天我尝试安装 gcc,它显示了相同的错误。所以我请求帮助我解决这个问题。谢谢!

在我最近一次更新尝试中,我收到以下错误消息,

admins@admins-desktop:~$ sudo apt-get install build- 
essential
Reading package lists... Done
Building dependency tree       
Reading state information... Done
build-essential is already the newest version (12.1ubuntu2).
The following packages were automatically installed and are no longer 
required:
 apt-xapian-index gimp-data gimp-help-common gimp-help-en gir1.2- 
gmenu-3.0
libamd2.4.1 libbabl-0.1-0 libbonobo2-0 libbonobo2-common libcamd2.4.1
libccolamd2.9.1 libcholmod3.0.6 libgegl-0.3-0 libgimp2.0 libgnome-2-0
libgnome2-common libgnomevfs2-0 libgnomevfs2-common libgtkglext1
libgutenprintui2-1 libllvm3.8 libllvm4.0 libmircommon5 libopencc1
   liborbit-2-0 libpango1.0-0 libpangox-1.0-0 libpython-stdlib 
libpyzy- 1.0-0v5
         libqmi-glib1 libqt4-designer libqt4-help libqt4-opengl 
libqt4- 
scripttools
libqt4-svg libqt4-test libqtassistantclient4 libqtwebkit4 librsync1
libsdl1.2debian libtiff-tools libumfpack5.7.1 libxapian-1.3-5
linux-headers-4.4.0-109 linux-headers-4.4.0-109-generic
linux-headers-4.4.0-112 linux-headers-4.4.0-112-generic
linux-headers-4.4.0-36 linux-headers-4.4.0-36-generic linux-headers- 
4.4.0-66
  linux-headers-4.4.0-66-generic linux-headers-4.4.0-70
  linux-headers-4.4.0-70-generic linux-headers-4.4.0-83
  linux-headers-4.4.0-83-generic linux-headers-4.4.0-98
  linux-headers-4.4.0-98-generic linux-image-4.4.0-109-generic
  linux-image-4.4.0-112-generic linux-image-4.4.0-36-generic
  linux-image-4.4.0-66-generic linux-image-4.4.0-70-generic
  linux-image-4.4.0-83-generic linux-image-4.4.0-98-generic
linux-image-extra-4.4.0-109-generic linux-image-extra-4.4.0-112- 
generic
linux-image-extra-4.4.0-36-generic linux-image-extra-4.4.0-66-generic
linux-image-extra-4.4.0-70-generic linux-image-extra-4.4.0-83-generic
linux-image-extra-4.4.0-98-generic linux-signed-image-4.4.0-109- 
generic
linux-signed-image-4.4.0-112-generic linux-signed-image-4.4.0-36- 
generic
linux-signed-image-4.4.0-66-generic linux-signed-image-4.4.0-70- 
generic
linux-signed-image-4.4.0-83-generic linux-signed-image-4.4.0-98- 
generic
oneconf-common python-cffi-backend python-cups python-httplib2 python- 
lxml
python-pam python-serial python-twisted-bin python-xapian python3- 
oneconf
python3-piston-mini-client python3-xapian1.3 snap-confine
ubuntu-core-launcher ubuntuone-client-data
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
10 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up initramfs-tools (0.122ubuntu8.11) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-4.4.0-119-generic (4.4.0-119.143) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-4.4.0-119- 
generic
vmlinuz(/boot/vmlinuz-4.4.0-119-generic
) points to /boot/vmlinuz-4.4.0-119-generic
(/boot/vmlinuz-4.4.0-119-generic) -- doing nothing at 
/var/lib/dpkg/info/linux-image-4.4.0-119-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0- 
119-generic /boot/vmlinuz-4.4.0-119-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-119- 
generic /boot/vmlinuz-4.4.0-119-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-119-generic
E: /usr/share/initramfs-tools/hooks/brltty failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.4.0-119-generic with 
1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return 
code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux- 
image-4.4.0-119-generic.postinst line 1052.
dpkg: error processing package linux-image-4.4.0-119-generic (-- 
configure):
 subprocess installed post-installation script returned error exit 
status 2
dpkg: dependency problems prevent configuration of linux-image-extra- 
4.4.0-119-generic:
linux-image-extra-4.4.0-119-generic depends on linux-image-4.4.0-119- 
generic; however:
 Package linux-image-4.4.0-119-generic is not configured yet.

dpkg: error processing package linux-image-extra-4.4.0-119-generic (-- 
configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image- 
generic:
linux-image-generic depends on linux-image-4.4.0-119-generic; however:
Package linux-image-4.4.0-119-generic is not configured yet.
linux-image-generic depends on linux-image-extra-4.4.0-119-generic; 
however:
Package linux-image-extra-4.4.0-119-generic is not configured yet.

dpkg: error processing package linux-image-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
linux-generic depends on linux-image-generic (= 4.4.0.119.125); 
 however:
 Package linux-image-generic is not No apport report written because 
 the error message indicates its a followup error from a previous 
 failure.
                                                           No apport 
report written because the error message indicates its a followup 
error from a previous failure.
     No apport report written because MaxReports is reached already
                                                                   No 
apport report written because MaxReports is reached already
                                                   No apport report 
written because MaxReports is reached already
No apport report written because 
MaxReports is reached already
No apport report written because MaxReports is reached 
already

No apport report written because MaxReports is reached already
                                                         configured 
yet.

dpkg: error processing package linux-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic-lts- 
utopic:
linux-generic-lts-utopic depends on linux-generic; however:
Package linux-generic is not configured yet.

dpkg: error processing package linux-generic-lts-utopic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-signed-image- 
4.4.0-119-generic:
linux-signed-image-4.4.0-119-generic depends on linux-image-4.4.0-119- 
generic (= 4.4.0-119.143); however:
Package linux-image-4.4.0-119-generic is not configured yet.

dpkg: error processing package linux-signed-image-4.4.0-119-generic (- 
-configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-signed-image- 
generic:
linux-signed-image-generic depends on linux-signed-image-4.4.0-119- 
generic; however:
Package linux-signed-image-4.4.0-119-generic is not configured yet.
linux-signed-image-generic depends on linux-image-extra-4.4.0-119- 
generic; however:
Package linux-image-extra-4.4.0-119-generic is not configured yet.

dpkg: error processing package linux-signed-image-generic (-- 
configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-signed- 
generic:
linux-signed-generic depends on linux-signed-image-generic (= 
4.4.0.119.125); however:
Package linux-signed-image-generic is not configured yet.

dpkg: error processing package linux-signed-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-signed- 
generic-lts-utopic:
linux-signed-generic-lts-utopic depends on linux-signed-generic; 
however:
Package linux-signed-generic is not configured yet.

dpkg: error processing package linux-signed-generic-lts-utopic (-- 
configure):
dependency problems - leaving unconfigured
Processing triggers for initramfs-tools (0.122ubuntu8.11) ...
update-initramfs: Generating /boot/initrd.img-4.4.0-116-generic
E: /usr/share/initramfs-tools/hooks/brltty failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.4.0-116-generic with 
1.
dpkg: error processing package initramfs-tools (--configure):
subprocess installed post-installation script returned error exit 
status 1
No apport report written because MaxReports is reached already
                                                          Errors were 
encountered while processing:
 linux-image-4.4.0-119-generic
 linux-image-extra-4.4.0-119-generic
 linux-image-generic
 linux-generic
 linux-generic-lts-utopic
 linux-signed-image-4.4.0-119-generic
 linux-signed-image-generic
 linux-signed-generic
 linux-signed-generic-lts-utopic
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)

我也想知道如何像我一样发布长代码部分,因为当我尝试复制粘贴时,它没有将其作为代码段,而是将其作为文本格式。我尝试了很多次,但都徒劳无功,然后我将整个代码按建议的边距移动以使其成为代码附件。尽管我最终能够做到这一点,但移动每一行确实令人沮丧和乏味,所以我也想知道如何通过终端窗口复制将长代码粘贴到这里作为代码段。谢谢你,我为这么长的帖子道歉。再次感谢!

相关内容