Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to install Django on a machine that is primarily a network administration box; it has nagios and cacti installed on it. I went in today to install Django, and when I followed the following instruction I got weird results:

sudo apt-get install apache2 libapache2-mod-python 

Told me it was freeing 77 MB worth of files. I should have taken more notice and stopped, but I assumed if apt-get wanted to do it, that it was probably OK. The next thing I see however is an ncurses based app explaining that we were now removing cacti. I hit ctrl-z, as I don't want to remove cacti. Now my system seems to be in a bit of a weird state (though cacti is still OK). For example:

me@mysystem:~$ sudo dpkg -l|grep -v "ii"
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                            Version                         Description
rF  cacti                           0.8.7e-2                        Frontend to rrdtool for monitoring systems a
rc  cacti-spine                     0.8.7e-2build1                  Multi-Threading poller for cacti
rc  libgd2-noxpm                    2.0.36~rc1~dfsg-3.1ubuntu1      GD Graphics Library version 2 (without XPM s

Also, I'm seeing lots of these errors now (as expected, I suppose):

E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

What's my best next step? I don't want to lose my cacti config for sure. What's the best way to go about cleaning up this system?

share|improve this question
You shouldn't loose the configuration file unless you run apt-get purge [package] – Marco Ceppi Oct 7 '10 at 19:08
OK ... are you suggesting I let it remove cacti and then manually re-add it? – Kyle Hodgson Oct 7 '10 at 19:11
This question might relate to this bug: – koanhead Oct 7 '10 at 19:45
thanks koanhead! – Kyle Hodgson Oct 8 '10 at 1:53

If I'm reading that correctly, the first step would be dpkg-reconfigure cacti.

This may or may not work- I'm assuming the configs somehow got munched during the install.

I just installed libapache2-mod-python on this machine and did aptitude why-not cacti and got "Unable to find a reason to remove cacti." This is a bit odd, as cacti is not installed.

Result of aptitude install cacti after installing the above:

Reading package lists... Done Building dependency tree
Reading state information... Done Reading extended state information
Initializing package states... Done The following NEW packages will be installed: apache2-mpm-prefork{a} cacti dbconfig-common{a} libapache2-mod-php5{a} libdbd-mysql-perl{a} libdbi-perl{a} libhtml-template-perl{a} libnet-daemon-perl{a} libphp-adodb{a} libplrpc-perl{a} mysql-client-5.1{a} mysql-client-core-5.1{a} mysql-server{a} mysql-server-5.1{a} mysql-server-core-5.1{a} php5-cli{a} php5-common{a} php5-mysql{a} php5-snmp{a} rrdtool{a} snmp{a}

The following packages will be REMOVED: apache2-mpm-worker{a}

0 packages upgraded, 21 newly installed, 1 to remove and 0 not upgraded.

Need to get 33.2MB of archives. After unpacking 86.6MB will be used.

I don't understand why aptitude want to remove mpm-worker if it doesn't detect it as a conflict (via aptitude why-not). Do you still have mpm-worker installed?

share|improve this answer
apache2-mpm-worker and apache2-mpm-prefork are packages that are mutual exclusive, i.e. you can only have one version installed. Since the package you install depends on apache2-mpm-prefork, it will installed, hence apache2-mpm-worker must be removed. – txwikinger Oct 7 '10 at 20:00
I've also recently installed moodle, btw which might be confusing things. OK ... I have a backup of this machine, so I'll try the reconfigure. – Kyle Hodgson Oct 8 '10 at 1:57
Package: apache2-mpm-prefork State: not installed – koanhead Oct 8 '10 at 6:26
Whoops, I commented before I understood what txwikinger was talking about. Yes, from the package states readout above, cacti depends on mpm-prefork, which, as txwikinger points out, conflicts with mpm-worker (I'm taking your word for this, aptitude why-not apache2-mpm-prefork does not make this obvious). Nice catch, sir. – koanhead Oct 8 '10 at 6:35
me@mymachine:~$ sudo dpkg-reconfigure cacti /usr/sbin/dpkg-reconfigure: cacti is broken or not fully installed – Kyle Hodgson Oct 8 '10 at 19:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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