0

I've read multiple threads and forums but can't remove this issue. I tried removing using purge and checked this page. Let me know how to fix this. Thanks.

(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 Answer 1

0

It seems that the symbolic link pyclean is broken. That happens often in a mixed python2/python3 environment. pyclean belongs to the package python2-minimal. So, this package should be uninstalled first.

2
  • Any idea how to deal with it? Should I remove python2 or python3? Jul 27 at 15:32
  • apt remove python2-minimal
    – Harry
    Jul 27 at 21:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.