1
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 301729 files and directories currently installed.)
Preparing to unpack .../libpython2.7_2.7.6-8ubuntu0.2_amd64.deb ...
Unpacking libpython2.7:amd64 (2.7.6-8ubuntu0.2) over (2.7.6-8) ...
dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
dpkg-deb: error: subprocess <decompress> returned error exit status 2
dpkg: error processing archive/var/cache/apt/archives/libpython2.7_2.7.6-8ubuntu0.2_amd64.deb (--unpack):     cannot copy extracted data for './usr/lib/x86_64-linux-    gnu/libpython2.7.so.1.0' to '/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0.dpkg-new': unexpected end of file or stream
Errors were encountered while processing:
/var/cache/apt/archives/libpython2.7_2.7.6-8ubuntu0.2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

The above is the result of apt-get upgrade -f dpkg. I appreciate any help you can give on this issue!

Edit: Here are a few more details. I am using Linux Mint 17.2 Cinnamon 640bit. Many programs seem to be crashing and Synaptic says that python2.7 and libpython2.7 are broken, but is unable to fix them. Every attempt to fix them has resulted in E: Sub-process /usr/bin/dpkg returned an error code (1).

I ran apt-get update and then apt-get upgrade -f dpkg and got the result above.

  • What is your distro version? Have you run apt-get update before upgrade? – Kira Oct 30 '15 at 17:48
  • Why are you doing this? – terdon Oct 30 '15 at 18:51
  • do some apt-get clean first。 – Arthur2e5 Oct 30 '15 at 20:23
1

Running sudo apt-get clean on the command line worked for me.

From a related question on ask ubuntu:

sudo apt-get clean clears out the local repository of retrieved package files.

So it seems that some downloaded package file was faulty. Deleting it and applying updates (downloading the file again) fixed it.

[I would have upvoted the comment above, but lack reputation]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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