Saturday, August 24, 2013

Sub-Process /usr/bin/dpkg returned an error code (1) [SOLUTION] for Kali Linux / BackTrack / Debian

Written by: Pranshu Bajpai | Find Pranshu on Google+ And LinkedIn

If you have worked in Linux long enough, you might have come across this nasty error while installing new packages. I'm saying it's nasty simply because you'll try all you know to get rid of it but it just won't go away.

Here's what the error looks like when you try to remove the package that is creating the problem:


This next screen shows what happens when you try to install a new package:


The solution to this would be to remove any traces of this package, in this case vsftpd, in two locations:

Location 1: cd /var/lib/dpkg/info



Location 2: cd /var/cache/apt/archives/



Navigate to these paths and remove the vsftpd files, nomatter what the extension of that file.

After removing said files, the problem should resolve, and you should be able to install new packages.


Note: This solution is something that worked for me and should work for others as well, but if it doesn't, let me know in comments below.

10 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. I dont understand
    please explain one by one cause i am newbie

    ReplyDelete
    Replies
    1. im new one to and i fixeed armitage now i have to fix usr bin dpkg damn....

      Delete
  3. works perfectly after i tired many other BAD suggestions. thanks!

    ReplyDelete
  4. Good post, works well...

    ReplyDelete
  5. I spent days trying to figure out why I couldn't remove the vsftpd package to reinstall it after it got corrupt when upgrading ubuntu 12.10 to 14.04. Thank you so much for posting this solution!!!

    ReplyDelete
  6. Thank you so much for this solution ! Works well !

    ReplyDelete
  7. thanks it works

    ReplyDelete
  8. Thanks so much, worked for me.

    ReplyDelete