我该如何解决dpkg依赖?
administrator@zlounes:~$ sudo apt-get dist-upgrade Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies: linux-server : Depends: linux-headers-server (= 3.2.0.37.44) but 3.2.0.37.45 is installed E: Unmet dependencies. Try using -f. administrator@zlounes:~$ sudo apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following extra packages will be installed: linux-image-server linux-server The following packages will be upgraded: linux-image-server linux-server 2 upgraded, 0 newly installed, 0 to remove and 9 not upgraded. 4 not fully installed or removed. Need to get 0 B/4,458 B of archives. After this operation, 0 B of additional disk space will be used. Do you want to continue [Y/n]? y Traceback (most recent call last): File "/usr/bin/apt-listchanges", line 237, in main() File "/usr/bin/apt-listchanges", line 48, in main debs = apt_listchanges.read_apt_pipeline(config) File "/usr/share/apt-listchanges/apt_listchanges.py", line 83, in read_apt_pipeline return map(lambda pkg: filenames[pkg], order) File "/usr/share/apt-listchanges/apt_listchanges.py", line 83, in return map(lambda pkg: filenames[pkg], order) KeyError: 'linux-image-server' Setting up initramfs-tools (0.99ubuntu13.1) ... update-initramfs: deferring update (trigger activated) Setting up linux-image-3.2.0-37-generic (3.2.0-37.58) ... Running depmod. update-initramfs: deferring update (hook will be called later) The link /initrd.img is a dangling linkto /boot/initrd.img-3.2.0-37-generic Examining /etc/kernel/postinst.d. run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.2.0-37-generic /boot/vmlinuz-3.2.0-37-generic update-initramfs: Generating /boot/initrd.img-3.2.0-37-generic gzip: stdout: No space left on device E: mkinitramfs failure cpio 141 gzip 1 update-initramfs: failed for /boot/initrd.img-3.2.0-37-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-3.2.0-37-generic.postinst line 1010. dpkg: error processing linux-image-3.2.0-37-generic (--configure): subprocess installed post-installation script returned error exit status 2 dpkg: dependency problems prevent configuration of linux-image-server: linux-image-server depends on linux-image-3.2.0-37-generic; however: Package linux-image-3.2.0-37-generic is not configured yet. dpkg: error processing linux-image-server (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of linux-server: linux-server depends on linux-image-server (= 3.2.0.37.44); however: Package linux-image-server is not configured yet. linux-server depends on linux-headers-server (= 3.2.0.37.44); however: Version of linux-headers-server on system is 3.2.0.37.45. dpkg: error processing linux-server (--configure): dependency problems - leaving unconfigured Processing triggers for initramfs-tools ... update-initramfs: Generating /boot/initrd.img-3.2.0-36-generic 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. gzip: stdout: No space left on device E: mkinitramfs failure cpio 141 gzip 1 update-initramfs: failed for /boot/initrd.img-3.2.0-36-generic with 1. dpkg: error processing 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-3.2.0-37-generic linux-image-server linux-server initramfs-tools E: Sub-process /usr/bin/dpkg returned an error code (1)
我已经尝试了很多,但无法实现这一点。 我想我打断了安装,它只是搞砸了。 我用Google搜索并尝试了各种修复方法。
编辑(清理我的/ boot文件夹后):
administrator@zlounes:/boot$ sudo apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following extra packages will be installed: linux-server The following packages will be upgraded: linux-server 1 upgraded, 0 newly installed, 0 to remove and 9 not upgraded. 1 not fully installed or removed. Need to get 0 B/1,734 B of archives. After this operation, 0 B of additional disk space will be used. Do you want to continue [Y/n]? y Traceback (most recent call last): File "/usr/bin/apt-listchanges", line 237, in main() File "/usr/bin/apt-listchanges", line 48, in main debs = apt_listchanges.read_apt_pipeline(config) File "/usr/share/apt-listchanges/apt_listchanges.py", line 83, in read_apt_pipeline return map(lambda pkg: filenames[pkg], order) File "/usr/share/apt-listchanges/apt_listchanges.py", line 83, in return map(lambda pkg: filenames[pkg], order) KeyError: 'linux-server' dpkg: dependency problems prevent configuration of linux-server: linux-server depends on linux-image-server (= 3.2.0.37.44); however: Version of linux-image-server on system is 3.2.0.37.45. linux-server depends on linux-headers-server (= 3.2.0.37.44); however: Version of linux-headers-server on system is 3.2.0.37.45. dpkg: error processing linux-server (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure. E: Sub-process /usr/bin/dpkg returned an error code (1) administrator@zlounes:/boot$
一个很好的尝试,以确保您的系统良好的形状,并没有中止安装的问题是调用
dpkg --configure -a
确保更新包列表,并且不会显示任何问题:
apt-get update
可选您可以在更新前删除所有旧数据:
find /var/lib/apt/lists -type f |xargs rm -f >/dev/null \
解决问题的下一步是删除linux-server软件包一段时间。 这可以完成,因为它没有真正的内容,只引入依赖:
此程序包将始终取决于可用于服务器设备的最新完整Linux内核。
dpkg --remove linux-server
执行此步骤后,检查是否已安装所有当前依赖项:
apt-get install -f
如果一切正常,您现在可以再次安装linux-server :
apt-get install linux-server
Postscriptum
linux-server在12.04中已弃用。 对于服务器设备 ,也使用通用内核。 请参阅apt-cache show linux-image-server
包:linux-image-server …
部分: 元数据包
….
取决于:linux-image-3.2.0-23- generic ,linux-firmware
我经常不得不清理我的机器的/ boot并且通常太完整打破更新 – 不确定最终的解决方案是什么,但我使用的过程似乎工作:
从sudo su
然后转到/ boot并执行ls -lSrh
– 底部的那些是最大的 – rm
足够的旧版ls -lSrh
清理足够的空间。
然后尝试以下(从上面摘录一下):
-
sudo apt-get remove linux-server
-
dpkg --configure -a
-
apt-get update
-
apt-get install -f
-
apt-get autoremove
-
dpkg --get-selections|grep 'linux-image*'|awk '{print $1}'|egrep -v "linux-image-$(uname -r)|linux-image-generic" |while read n;done
-
apt-get install linux-image-server linux-server
-
reboot
如果有任何失败,请在此处发表评论,我将看到问题可能是什么。
在使用pitti PPA时,我已经看到这种事情适用于postgresql-9.1软件包问题。
有一次,当我运行程序时,我遇到了grub的问题。 做一个apt-get install --reinstall grub
修复它。
谢谢你的一个class轮去: http : //ubuntuforums.org/showpost.php?p = 12180959&posttcount = 7
祝好运!
gzip:stdout:设备上没有剩余空间
看来你的空间已经用完了。 清除一些空间并通过以下方式修复包问题:
sudo apt-get purge sudo apt-get clean sudo apt-get check sudo apt-get install -f sudo dpkg --configure -a
然后再次重新安装包。
来源: 线程:Dpkg:依赖问题 – 保持未配置状态 。
- sudo apt get update给出错误 – 包缓存文件已损坏
- 我无法在我的64位Ubuntu上安装libtiff
- dpkg-divert:错误:重命名涉及用不同的文件`/usr/lib/xorg/protocol-precise.txt’覆盖`/usr/lib/xorg/protocol.txt’,不允许
- 备份软件源
- 安装ttf-mscorefonts-installer时的权限错误/无法删除权限,因为用户’_apt’无法访问文件
- apt-get无法安装apt-cache策略中列出的特定版本
- 如何通过apt-get找到要安装的软件包
- 我该如何降级谷歌浏览器?
- 重新安装Ubuntu 13.10后无法添加任何PPA