I needed to get a bug fix which arrived in Python 2.7.3
Latest version available for 11.10 was 2.7.2, so I built Python 2.7.3 from source
Now when I try to apt-get [anything]
I get this error at the end:
Setting up unattended-upgrades (0.73ubuntu1) ...
update-rc.d: warning: unattended-upgrades start runlevel arguments (2 3 4 5) do not match LSB Default-Start values (none)
update-rc.d: warning: unattended-upgrades stop runlevel arguments (0 1 6) do not match LSB Default-Stop values (0 6)
Checking for running unattended-upgrades:
Traceback (most recent call last):
File "/usr/share/unattended-upgrades/unattended-upgrade-shutdown", line 27, in <module>
import apt_pkg
ImportError: No module named apt_pkg
invoke-rc.d: initscript unattended-upgrades, action "start" failed.
dpkg: error processing unattended-upgrades (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
unattended-upgrades
E: Sub-process /usr/bin/dpkg returned an error code (1)
Since this error is python related I assume I have broken some part of apt by installing a new python.
Although I installed to /usr/local/bin and haven't touched the /usr/bin/python, which is still the 2.7.2 version that came with Ubuntu.
Very grateful if someone can suggest a way out of the mess I'm now in, preferrably without reinstalling the OS.