[ubuntu] cups-dameon 報錯問題解決

問題描述:

系統是ubuntu16.04不知名魔改版到arm64板子上的。出現了cups-dameon的問題。

root@ubuntu:/etc/apt# apt-get -f install 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  cups-daemon
Suggested packages:
  cups-bsd foomatic-db-compressed-ppds | foomatic-db printer-driver-hpcups
  hplip cups-pdf smbclient
The following packages will be upgraded:
  cups-daemon
1 upgraded, 0 newly installed, 0 to remove and 63 not upgraded.
45 not fully installed or removed.
Need to get 0 B/275 kB of archives.
After this operation, 4096 B disk space will be freed.
Do you want to continue? [Y/n] y
dpkg: warning: files list file for package 'cloud-guest-utils' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'cloud-initramfs-copymods' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'cloud-initramfs-dyn-netconf' missing; assuming package has no files currently installed
(Reading database ... 82920 files and directories currently installed.)
Preparing to unpack .../cups-daemon_2.1.3-4ubuntu0.10_arm64.deb ...
Failed to stop cups.path: Unit cups.path not loaded.
dpkg: warning: subprocess old pre-removal script returned error exit status 5
dpkg: trying script from the new package instead ...
Failed to stop cups.socket: Unit cups.socket not loaded.
dpkg: error processing archive /var/cache/apt/archives/cups-daemon_2.1.3-4ubuntu0.10_arm64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 5
/usr/bin/deb-systemd-helper: error: unable to read cups.path
/usr/bin/deb-systemd-helper: error: unable to read cups.service
/usr/bin/deb-systemd-helper: error: unable to read cups.socket
Failed to get unit file state for cups.path: No such file or directory
cups.path is a disabled or a static unit, not starting it.
Errors were encountered while processing:
 /var/cache/apt/archives/cups-daemon_2.1.3-4ubuntu0.10_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

解決辦法:

$ sudo mv /var/lib/dpkg/info/ /var/lib/dpkg/info_old/
$ sudo mkdir /var/lib/dpkg/info/
$ sudo apt-get update
$ sudo apt-get -f install
$ sudo mv /var/lib/dpkg/info/* /var/lib/dpkg/info_old/
$ sudo rm -rf /var/lib/dpkg/info
$ sudo mv /var/lib/dpkg/info_old/ /var/lib/dpkg/info/ 

參考鏈接:123 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章