0

I am not able to uninstall any program on Ubuntu due to a Python config error. Some googling led me to do a download and install missing Python packages and then execute:

sudo dpkg --configure -a
sudo apt-get -f install

But still I see the same error. Posting below.

>> **sudo apt-get -f install**
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/224 kB of archives.
After this operation, 0 B of additional disk space will be used.
dpkg: error processing package python2.7 (--configure):
 package python2.7 is not ready for configuration
 cannot configure (current status 'half-installed')
Errors were encountered while processing:
 python2.7
E: Sub-process /usr/bin/dpkg returned an error code (1)

How do I fix this error?

Melebius
  • 11,431
  • 9
  • 52
  • 78
Ponnu
  • 1
  • https://askubuntu.com/q/490671/250300 might help. However, be careful with Python 2 since APT itself relies on it AFAIK. – Melebius Jun 25 '18 at 07:22

1 Answers1

0

You need to remove package completely using following command in terminal.

sudo dpkg --remove --force-remove-reinstreq python2.7
KK Patel
  • 19,083