当前位置: 首页 > 工具软件 > CUPS-PDF > 使用案例 >

[ubuntu] cups-dameon 报错问题解决

刘承悦
2023-12-01

问题描述:

系统是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 

 类似资料: