1

I'm trying to fix a dpkg error with one of my packages, python-zope.hookable. The dpgk -l command looks like this:

 pFR python-zope.hookable                          4.0.4-4build2               amd64                       Hookable object support

However, when I run sudo dpkg -P --force-all python-zope.hookable, I mysteriously get this output:

dpkg: python-zope.hookable: dependency problems, but removing anyway as you requested:
 python-zope.component depends on python-zope.hookable; however:
  Package python-zope.hookable is to be removed.

dpkg: warning: overriding problem because --force enabled:
dpkg: warning: package is in a very bad inconsistent state; you should
 reinstall it before attempting a removal
(Reading database ... 871356 files and directories currently installed.)
Removing python-zope.hookable (4.0.4-4build2) ...
Killed
E: namespace:121: cannot remove /usr/lib/python2.7/dist-packages/zope/__init__.py

Creating an empty file at /usr/lib/python2.7/dist-packages/zope/__init__.py simply gives the same error, but without the last line. I suspect this is an issue with all python packages on my machine installed with dpkg, though I dare not test it.

This issue is preventing me from running apt-get install and apt-get remove, and dpkg --configure -a does not seem to change anything.

I'm really at my wits' end, and I'm open to drastic solutions.

3
  • 1
    The 'killed' indicates the process was killed by some other user or system - it's entirely possible that the system was attempting to remove it but took up too much memory and the system issued a "KILL" command to stop the process. Check the /var/log/syslog for any traces of 'process killed' or 'oom-killer' or such.
    – Thomas Ward
    Jan 28, 2019 at 14:56
  • Yes you are right. Syslog shows memory issues. I managed to resolve it after resizing the VPS.
    – Fred
    Jan 29, 2019 at 2:43
  • I've made a revision of my comment as an answer. If you wish you can accept it.
    – Thomas Ward
    Jan 29, 2019 at 2:46

2 Answers 2

0

Typically, the Killed message indicates the process was killed by some other user or system. This is either because of administrative, or automated, intervention and happens usually because over-used CPU or over-extended RAM and the system trying to free up resources for the system to run.

It's entirely possible that the system was attempting to remove it but took up too much memory and the system issued a "KILL" command to stop the process. I asked you to check the /var/log/syslog for any traces of 'process killed' or 'oom-killer' or such. Your comments in response to me on the question indicated the system was using the Out of Memory Killer or similar process because you were over-using the RAM and the system was trying to avoid running out of resources.

Therefore, the core problem was you did not have enough memory available to run everything on the system.

I would suggest evaluating all that's running and determine whether the RAM and specs you had gotten in the VPS are actually suitable; there can be cases where they aren't going to be and you'll need a larger VPS like you figured out here.

0

Since you wrote: "I'm really at my wits' end, and I'm open to drastic solutions."

I'd suggest removing the block of the corresponding package from /var/lib/dpkg/status

this should do the trick

1
  • I managed to avoid the system kill by increasing memory instead of doing this, though this sounds like a very useful trick that I could use in the future!
    – Fred
    Jan 29, 2019 at 2:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .