Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I can't install or remove packages in Debian. When I type apt-get -f install to fix the problem I get this error:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
 libgmp3c2 libpython2.6 libssl-dev python-gnupginterface python2.6-dev zlib1g-dev
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
    python-pkg-resources python-setuptools
    Suggested packages:
  python-distribute-doc
The following packages will be upgraded:
  python-pkg-resources python-setuptools
2 upgraded, 0 newly installed, 0 to remove and 190 not upgraded.
1 not fully installed or removed.
Need to get 0 B/323 kB of archives.
After this operation, 989 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Reading changelogs... Done
dpkg: error processing /var/cache/apt/archives/python-setuptools_3.4.1-1_all.deb (--unpack):
 parse error, in file '/var/lib/dpkg/tmp.ci/control' near line 6 package 'python-setuptools':
`Depends' field, invalid package name `python:any': character `:' not allowed (only letters, digits and characters `-+._')
dpkg: error processing /var/cache/apt/archives/python-pkg-resources_3.4.1-1_all.deb (--unpack):
 parse error, in file '/var/lib/dpkg/tmp.ci/control' near line 7 package 'python-pkg-resources':
 `Depends' field, invalid package name `python:any': character `:' not  allowed (only letters, digits and characters `-+._')
Errors were encountered while processing:
 /var/cache/apt/archives/python-setuptools_3.4.1-1_all.deb
 /var/cache/apt/archives/python-pkg-resources_3.4.1-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I've searched a lot but can't solve this problem.

share|improve this question

2 Answers 2

I faced the same issue until I updated the 3 following packages to the same version: dpkg, dpkg-dev, libdpkg-perl

Before that, I had a mix of version 1.15 and 1.16. I updated all 3 packages to 1.17.

share|improve this answer

Have you tried running?

apt-get clean

Clears out the local repository of retrieved package files. It removes everything but the lock file from /var/cache/apt/archives/ and /var/cache/apt/archives/partial/.

share|improve this answer
    
yes.but don't work –  mojibuntu Apr 13 at 18:21

Your Answer

 
discard

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.