我有 6 个更新无法在 Ubuntu 12.04 上安装?

我有 6 个更新无法在 Ubuntu 12.04 上安装?

我是 Ubuntu 新手,所以非常感谢大家的帮助。我运行的是 12.04,有六个更新无法安装。我尝试过更新管理器、sudo apt-get upgradesudo apt-get update。到目前为止,没有任何效果。

以下是 sudo apt-get dist-upgrade 之后的输出:

Reading package lists... Done  
Building dependency tree         
Reading state information... Done  
Calculating upgrade... Done  
The following packages will be upgraded:  
  fglrx fglrx-amdcccle fglrx-dev linux-generic-pae  
  linux-image-3.2.0-24-generic-pae linux-image-generic-pae  
6 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.  
11 not fully installed or removed.  
Need to get 0 B/83.0 MB of archives.  
After this operation, 53.1 MB of additional disk space will be used.  
Do you want to continue [Y/n]? y  
Setting up linux-image-3.2.0-24-generic-pae (3.2.0-24.37) ...  
Running depmod.  
sh: 1: /usr/sbin/update-initramfs: not found  
Failed to create initrd image.  
dpkg: error processing linux-image-3.2.0-24-generic-pae (--configure):  
 subprocess installed post-installation script returned error exit status 2  
Setting up linux-image-3.2.0-27-generic-pae (3.2.0-27.43) ...  
Running depmod.  
sh: 1: /usr/sbin/update-initramfs: not found  
Failed to create initrd image.  
dpkg: error processing linux-image-3.2.0-27-generic-pae (--configure):  
 subprocess installed post-installation script returned error exit status 2  
Setting up linux-image-3.2.0-29-generic-pae (3.2.0-29.46) ...  
Running depmod.  
sh: 1: /usr/sbin/update-initramfs: not found  
Failed to create initrd image.  
dpkg: error processing linux-image-3.2.0-29-generic-pae (--configure):  
 subprocess installed post-installation script returned error exit status 2  
Setting up udev (175-0ubuntu9.1) ...  
No apport report written because MaxReports is reached already  
                                                              udev stop/waiting  
udev start/running, process 4840  
/var/lib/dpkg/info/udev.postinst: 87: /var/lib/dpkg/info/udev.postinst: update-  initramfs: not found  
dpkg: error processing udev (--configure):  
 subprocess installed post-installation script returned error exit status 127  
No apport report written because MaxReports is reached already  
                                                              dpkg: dependency problems   prevent configuration of xserver-xorg-core:  
 xserver-xorg-core depends on udev (>= 149); however:  
  Package udev is not configured yet.  
dpkg: error processing xserver-xorg-core (--configure):  
 dependency problems - leaving unconfigured  
No apport report written because MaxReports is reached already  
                                                              dpkg: dependency problems   prevent configuration of fglrx:  
 fglrx depends on xserver-xorg-core; however:  
  Package xserver-xorg-core is not configured yet.  
dpkg: error processing fglrx (--configure):  
 dependency problems - leaving unconfigured  
No apport report written because MaxReports is reached already  
                                                              dpkg: dependency problems   prevent configuration of fglrx-amdcccle:  
 fglrx-amdcccle depends on fglrx; however:  
  Package fglrx is not configured yet.  
dpkg: error processing fglrx-amdcccle (--configure):  
 dependency problems - leaving unconfigured  
No apport report written because MaxReports is reached already  
                                                              dpkg: dependency problems   prevent configuration of linux-image-generic-pae:  
 linux-image-generic-pae depends on linux-image-3.2.0-24-generic-pae; however:  
  Package linux-image-3.2.0-24-generic-pae is not configured yet.  
dpkg: error processing linux-image-generic-pae (--configure):  
 dependency problems - leaving unconfigured  
No apport report written because MaxReports is reached already  
                                                              dpkg: dependency problems   prevent configuration of linux-generic-pae:  
 linux-generic-pae depends on linux-image-generic-pae (= 3.2.0.24.26); however:  
  Package linux-image-generic-pae is not configured yet.  
dpkg: error processing linux-generic-pae (--configure):  
 dependency problems - leaving unconfigured  
No apport report written because MaxReports is reached already  
                                                              dpkg: dependency problems   prevent configuration of xserver-xorg-video-intel:  
 xserver-xorg-video-intel depends on xorg-video-abi-11; however:  
  Package xorg-video-abi-11 is not installed.  
  Package xserver-xorg-core which provides xorg-video-abi-11 is not configured yet.  
 xserver-xorg-video-intel depends on xserver-xorg-core (>= 2:1.10.99.901); however:  
  Package xserver-xorg-core is not configured yet.  
dpkg: error processing xserver-xorg-video-intel (--configure):  
 dependency problems - leaving unconfigured  
No apport report written because MaxReports is reached already  
                                                              dpkg: dependency problems   prevent configuration of fglrx-dev:  
 fglrx-dev depends on fglrx; however:  
  Package fglrx is not configured yet.  
dpkg: error processing fglrx-dev (--configure):  
 dependency problems - leaving unconfigured  
No apport report written because MaxReports is reached already  
                                                              Errors were encountered   while processing:   
 linux-image-3.2.0-24-generic-pae  
 linux-image-3.2.0-27-generic-pae  
 linux-image-3.2.0-29-generic-pae  
 udev  
 xserver-xorg-core  
 fglrx  
 fglrx-amdcccle  
 linux-image-generic-pae  
 linux-generic-pae  
 xserver-xorg-video-intel  
 fglrx-dev  
E: Sub-process /usr/bin/dpkg returned an error code (1)  

答案1

所有错误都表示找不到文件,即/usr/sbin/update-initramfs

现在我执行以下命令来找出哪个包应该提供该文件,下面是输出

$ dpkg -S /usr/sbin/update-initramfs
initramfs-tools: /usr/sbin/update-initramfs

因此,请尝试安装软件包 initramfs-tools 并重新运行更新。检查软件包是否已存在。

sudo dpkg -l |grep initramfs-tools

然后安装 initramfs-tools(如果没有找到)

sudo apt-get install initramfs-tools

sudo apt-get update然后使用或其他命令重复安装过程。

我很想知道这是否帮助您渡过了难关。

答案2

我在使用 linux-image-3.2.0-35-generic 时也遇到过类似的问题。

sudo apt-get install --reinstall initramfs-tools

似乎有所帮助。至少,所有软件包都安装成功,没有任何错误。据我所知(我的知识非常有限,请记住这一点),在某个时候,/usr/sbin/update-initramfs 因某种奇怪的原因被删除了。但该软件包仍被标记为已安装,因此

sudo apt-get install initramfs-tools

沒有改變任何内容。

答案3

在这种情况下尝试sudo apt-get dist-upgrade;也就是说,当通过更新管理器进行定期升级或sudo apt-get update && sudo apt-get upgrade遗漏某些软件包时 --- 特别是“linux-something”软件包(那些是内核更新)。

答案4

我在 Ubuntu 14.04 中遇到了类似的问题,并使用以下命令解决了:

sudo cp /usr/sbin/update-initramfs.orig.initramfs-tools /usr/sbin/update-initramfs

似乎已经安装了 initramfs-tools,但是可执行二进制文件由于某种原因更改了名称,导致 apt-get 无法用于升级内核!

相关内容