![无法删除或修复 python-cairo - 处理时遇到错误:python-cairo:amd64](https://linux22.com/image/948218/%E6%97%A0%E6%B3%95%E5%88%A0%E9%99%A4%E6%88%96%E4%BF%AE%E5%A4%8D%20python-cairo%20-%20%E5%A4%84%E7%90%86%E6%97%B6%E9%81%87%E5%88%B0%E9%94%99%E8%AF%AF%EF%BC%9Apython-cairo%3Aamd64.png)
我已阅读多个帖子和论坛,但无法删除此问题。我尝试使用清除功能删除,并检查了此页。请告诉我如何修复这个问题。谢谢。
(base) seek4samurai@ubuntu:~$ sudo apt-get remove python-cairo
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
python-cairo
0 upgraded, 0 newly installed, 1 to remove and 15 not upgraded.
1 not fully installed or removed.
After this operation, 270 kB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 316333 files and directories currently installed.)
Removing python-cairo:amd64 (1.16.2-2ubuntu2) ...
/var/lib/dpkg/info/python-cairo:amd64.prerm: 6: pyclean: Too many levels of symbolic links
dpkg: error processing package python-cairo:amd64 (--remove):
installed python-cairo:amd64 package pre-removal script subprocess returned error exit status 127
dpkg: too many errors, stopping
/var/lib/dpkg/info/python-cairo:amd64.postinst: 6: pycompile: Too many levels of symbolic links
dpkg: error while cleaning up:
installed python-cairo:amd64 package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
python-cairo:amd64
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
未完全安装的软件包无法删除。请尝试重新安装 python-cairo,然后将其删除。打开终端并输入:
sudo apt install --reinstall python-cairo
sudo apt remove python-cairo