{"id":6149,"date":"2016-12-04T14:19:40","date_gmt":"2016-12-04T06:19:40","guid":{"rendered":"https:\/\/kyle.ai\/blog\/?p=6149"},"modified":"2016-12-04T14:19:40","modified_gmt":"2016-12-04T06:19:40","slug":"%e8%a7%a3%e5%86%b3ubuntu%e5%8c%85%e6%8d%9f%e5%9d%8f%e9%97%ae%e9%a2%98%ef%bc%9adpkg-error-processing-package","status":"publish","type":"post","link":"https:\/\/kyle.ai\/blog\/6149.html","title":{"rendered":"\u89e3\u51b3Ubuntu\u5305\u635f\u574f\u95ee\u9898\uff1adpkg: error processing package"},"content":{"rendered":"<p>ubuntu\u5305\u7ba1\u7406\u5668\uff0c\u4e0d\u77e5\u9053\u600e\u4e48\u574f\u6389\u4e86\uff0c\u6267\u884c\u547d\u4ee4\u62a5\u9519\uff1a<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nroot@vps:~# apt-get install -f\r\n\r\nReading package lists... Done\r\nBuilding dependency tree       \r\nReading state information... Done\r\n0 upgraded, 0 newly installed, 0 to remove and 349 not upgraded.\r\n3 not fully installed or removed.\r\nAfter this operation, 0 B of additional disk space will be used.\r\nSetting up linux-image-3.19.0-76-generic (3.19.0-76.84) ...\r\nRunning depmod.\r\nupdate-initramfs: deferring update (hook will be called later)\r\nThe link \/initrd.img is a dangling linkto \/boot\/initrd.img-3.19.0-76-generic\r\nvmlinuz(\/boot\/vmlinuz-3.19.0-76-generic\r\n) points to \/boot\/vmlinuz-3.19.0-76-generic\r\n (\/boot\/vmlinuz-3.19.0-76-generic) -- doing nothing at \/var\/lib\/dpkg\/info\/linux-image-3.19.0-76-generic.postinst line 491.\r\nExamining \/etc\/kernel\/postinst.d.\r\nrun-parts: executing \/etc\/kernel\/postinst.d\/apt-auto-removal 3.19.0-76-generic \/boot\/vmlinuz-3.19.0-76-generic\r\nrun-parts: executing \/etc\/kernel\/postinst.d\/initramfs-tools 3.19.0-76-generic \/boot\/vmlinuz-3.19.0-76-generic\r\nupdate-initramfs: Generating \/boot\/initrd.img-3.19.0-76-generic\r\nE: \/usr\/share\/initramfs-tools\/hooks\/fixrtc failed with return 1.\r\nupdate-initramfs: failed for \/boot\/initrd.img-3.19.0-76-generic with 1.\r\nrun-parts: \/etc\/kernel\/postinst.d\/initramfs-tools exited with return code 1\r\nFailed to process \/etc\/kernel\/postinst.d at \/var\/lib\/dpkg\/info\/linux-image-3.19.0-76-generic.postinst line 1025.\r\ndpkg: error processing package linux-image-3.19.0-76-generic (--configure):\r\n subprocess installed post-installation script returned error exit status 2\r\ndpkg: dependency problems prevent configuration of linux-image-extra-3.19.0-76-generic:\r\n linux-image-extra-3.19.0-76-generic depends on linux-image-3.19.0-76-generic; however:\r\n  Package linux-image-3.19.0-76-generic is not configured yet.\r\n\r\ndpkg: error processing package linux-image-extra-3.19.0-76-generic (--configure):\r\n dependency problems - leaving unconfigured\r\nErrors were encountered while processing:\r\n linux-image-3.19.0-76-generic\r\n linux-image-extra-3.19.0-76-generic\r\nE: Sub-process \/usr\/bin\/dpkg returned an error code (1)\r\n<\/pre>\n<p>\u53ef\u4ee5\u770b\u5f97\u51fa\uff0c\u662f\u8fd9\u4e2a linux-image-3.19.0-76-generic \u5305\u6709\u95ee\u9898\uff0c\u4f9d\u8d56\u6216\u662f\u5176\u5b83\u95ee\u9898\uff0c\u5bfc\u81f4apt\u914d\u7f6e\u4e0d\u6210\u529f\u3002<\/p>\n<p>\u7f16\u8f91 dpkg status \u72b6\u6001\u6587\u4ef6\uff1a<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo vim \/var\/lib\/dpkg\/status\r\n<\/pre>\n<p>\u627e\u5230\u5305 linux-image-3.19.0-76-generic \u548c linux-image-extra-3.19.0-76-generic \u90a3\u4e00\u6bb5\uff0c\u5220\u6389\u3002\u7c7b\u4f3c\u8fd9\u6837\uff1a<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nPackage: linux-image-3.19.0-76-generic\r\nStatus: install ok half-configured\r\nPriority: optional\r\nSection: kernel\r\nInstalled-Size: 47223\r\nMaintainer: Ubuntu Kernel Team &lt;kernel-team@lists.ubuntu.com&gt;\r\nArchitecture: amd64\r\nSource: linux\r\nVersion: 3.19.0-76.84\r\nProvides: fuse-module, ivtv-modules, kvm-api-4, linux-image, linux-image-3.0, redhat-cluster-modules, virtualbox-guest-modules\r\nDepends: initramfs-tools (&gt;= 0.36ubuntu6) | linux-initramfs-tools, module-init-tools (&gt;= 3.3-pre11-4ubuntu3)\r\nPre-Depends: dpkg (&gt;= 1.10.24)\r\nRecommends: grub-pc | grub-efi-amd64 | grub-efi-ia32 | grub | lilo (&gt;= 19.1)\r\nSuggests: fdutils, linux-doc-3.19.0 | linux-source-3.19.0, linux-tools, linux-headers-3.19.0-76-generic\r\nConflicts: hotplug (&lt;&lt; 0.0.20040105-1)\r\nDescription: Linux kernel image for version 3.19.0 on 64 bit x86 SMP\r\n This package contains the Linux kernel image for version 3.19.0 on\r\n 64 bit x86 SMP.\r\n .\r\n Also includes the corresponding System.map file, the modules built by the\r\n packager, and scripts that try to ensure that the system is not left in an\r\n unbootable state after an update.\r\n .\r\n Supports Generic processors.\r\n .\r\n Geared toward desktop and server systems.\r\n .\r\n You likely do not want to install this package directly. Instead, install                                                                                             \r\n the linux-generic meta-package, which will ensure that upgrades work                                                                                                  \r\n correctly, and that supporting packages are also installed. \r\n<\/pre>\n<p> \u7136\u540e\u518d\u8fd0\u884c <\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n sudo apt-get install -f \r\n<\/pre>\n<p> \u6700\u540e\u53ef\u4ee5\u6e05\u7406\u6389\u4e0d\u7528\u7684\u6587\u4ef6\uff0c\u6839\u636e\u4e0a\u9762 linux-generic \u5305\u540e\u9762\u7684\u7248\u672c\u53f7\u627e\u5bf9\u5e94\u5e94\u8be5\u5220\u9664\u7684\u6587\u4ef6\u5939\uff1a<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nrm -rf \/lib\/modules\/3.19.0-76-generic\/\r\nrm -rf \/boot\/*3.19.0-76*\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>ubuntu\u5305\u7ba1\u7406\u5668\uff0c\u4e0d\u77e5\u9053\u600e\u4e48\u574f\u6389\u4e86\uff0c\u6267\u884c\u547d\u4ee4\u62a5\u9519\uff1a root@vps:~# apt-get install [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-6149","post","type-post","status-publish","format-standard","hentry","category-skill"],"_links":{"self":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/6149","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/comments?post=6149"}],"version-history":[{"count":1,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/6149\/revisions"}],"predecessor-version":[{"id":6150,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/6149\/revisions\/6150"}],"wp:attachment":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/media?parent=6149"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/categories?post=6149"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/tags?post=6149"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}