-2

I have encountered following error when I tried to run a command that sudo apt-get -f install. I am using Ubuntu 16.04.

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libpython2.7-stdlib:i386
The following NEW packages will be installed:
  libpython2.7-stdlib:i386
0 upgraded, 1 newly installed, 0 to remove and 14 not upgraded.
13 not fully installed or removed.
Need to get 0 B/1,903 kB of archives.
After this operation, 8,870 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 225635 files and directories currently installed.)
Preparing to unpack .../libpython2.7-stdlib_2.7.12-1ubuntu0~16.04.1_i386.deb ...
Unpacking libpython2.7-stdlib:i386 (2.7.12-1ubuntu0~16.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/libpython2.7-stdlib_2.7.12-1ubuntu0~16.04.1_i386.deb (--unpack):
 trying to overwrite shared '/usr/lib/python2.7/gettext.py', which is different from other instances of package libpython2.7-stdlib:i386
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/libpython2.7-stdlib_2.7.12-1ubuntu0~16.04.1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Apparently, libpython2.7-stdlib_2.7.12-1ubuntu0~16.04.1_i386.deb causing the error of it but I am not sure how to solve this issue after crawling in google. If you could help me out, it would be much appreciated. Thank you for your help in advance!

cs95
  • 379,657
  • 97
  • 704
  • 746
Wave
  • 111
  • 1
  • 3
  • 12

1 Answers1

0

You can delete all files in the cache using sudo apt-get clean

Alternatively you can delete .deb file which is giving problem:-

sudo rm  /var/cache/apt/archives/libpython2.7-stdlib_2.7.12-1ubuntu0~16.04.1_i386.deb   

After all this use sudo apt-get upgrade will download fresh copy again.

Vineet Jain
  • 1,515
  • 4
  • 21
  • 31
  • When I tried to run 'sudo apt-get upgrade', it returns following; Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies: libpython-stdlib:i386 : Depends: libpython2.7-stdlib:i386 (>= 2.7.11-1~) but it is not installed python2.7:i386 : Depends: libpython2.7-stdlib:i386 (= 2.7.12-1ubuntu0~16.04.1) but it is not installed (omit warnings since its too long) E: Unmet dependencies. Try using -f. It is actually original issue I faced. – Wave Oct 30 '17 at 06:38