dpkg 錯誤

dpkg 錯誤

當我嘗試安裝任何東西時,我收到錯誤。

前任:

diego@diego-Satellite-C655:~$ sudo apt-get install spotify-client
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libgconf2-4
Recommended packages:
  libavcodec53 libavcodec52 libavcodec-extra-53 libavcodec-extra-52
  libavformat53 libavformat52 libavformat-extra-53 libavformat-extra-52
The following NEW packages will be installed:
  libgconf2-4 spotify-client
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
5 not fully installed or removed.
Need to get 0 B/55.1 MB of archives.
After this operation, 130 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Selecting previously unselected package libgconf2-4:amd64.
(Reading database ... 198538 files and directories currently installed.)
Preparing to unpack .../libgconf2-4_3.2.6-0ubuntu2_amd64.deb ...
Unpacking libgconf2-4:amd64 (3.2.6-0ubuntu2) ...
Selecting previously unselected package spotify-client.
Preparing to unpack .../spotify-client_1%3a0.9.11.27.g2b1a638.81-1_amd64.deb ...
Unpacking spotify-client (1:0.9.11.27.g2b1a638.81-1) ...
Setting up libsane:amd64 (1.0.23-3ubuntu3.1) ...
dpkg: error processing package libsane:amd64 (--configure):
 cannot compute MD5 hash for file '/etc/sane.d/v4l.conf.dpkg-new': failed to read (Input/output error)
dpkg: dependency problems prevent configuration of hplip:
 hplip depends on libsane (= 1.0.11-3); however:
  Package libsane:amd64 is not configured yet.

dpkg: error processing package hplip (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of printer-driver-postscript-hp:
 printer-driver-postscript-hp depends on hplip (= 3.14.3-0ubuntu3.2); however:
  Package hplip is not configured yet.

dpkg: error processing package printer-driver-postscript-hp (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of sane-utils:
 sane-utils depends on libsane; however:
  Package libsane:amd64 is not configured yet.

dpkg: error processing package sane-utils (--configure):
 dependency problems - leaving unconfigured
dpkg: dependencyNo 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
                                 problems prevent configuration of simple-scan:
 simple-scan depends on libsane (= 1.0.11-3); however:
  Package libsane:amd64 is not configured yet.

dpkg: error processing package simple-scan (--configure):
 dependency problems - leaving unconfigured
Setting up libgconf2-4:amd64 (3.2.6-0ubuntu2) ...
Setting up spotify-client (1:0.9.11.27.g2b1a638.81-1) ...
Errors were encountered while processing:
 libsane:amd64
 hplip
 printer-driver-postscript-hp
 sane-utils
 simple-scan
E: Sub-process /usr/bin/dpkg returned an error code (1)

在“sudo dpkg --configure -a”之後

diego@diego-Satellite-C655:~$ sudo dpkg --configure -a
Setting up libsane:amd64 (1.0.23-3ubuntu3.1) ...
dpkg: error processing package libsane:amd64 (--configure):
 cannot compute MD5 hash for file '/etc/sane.d/v4l.conf.dpkg-new': failed to read (Input/output error)
dpkg: dependency problems prevent configuration of simple-scan:
 simple-scan depends on libsane (= 1.0.11-3); however:
  Package libsane:amd64 is not configured yet.

dpkg: error processing package simple-scan (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of hplip:
 hplip depends on libsane (= 1.0.11-3); however:
  Package libsane:amd64 is not configured yet.

dpkg: error processing package hplip (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of sane-utils:
 sane-utils depends on libsane; however:
  Package libsane:amd64 is not configured yet.

dpkg: error processing package sane-utils (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of printer-driver-postscript-hp:
 printer-driver-postscript-hp depends on hplip (= 3.14.3-0ubuntu3.2); however:
  Package hplip is not configured yet.

dpkg: error processing package printer-driver-postscript-hp (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 libsane:amd64
 simple-scan
 hplip
 sane-utils
 printer-driver-postscript-hp

另外,我的 dpkg 資料夾中沒有可用檔案。有人可以寄給我他的來代替我的嗎?

答案1

看起來套件libsane處於一種奇怪的狀態,因為套件管理器會尋找*.dpkg-new通常在套件配置階段覆蓋現有的不同設定檔時建立的設定檔 ( )。我建議您嘗試重新安裝:

sudo apt-get install --reinstall libsane

或者如果由於軟體包損壞而沒有出現(我們正在嘗試修復):

sudo dpkg --remove --pending
sudo apt-get install libsane

相關內容