LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-02-2017, 02:37 AM   #1
lqu17
LQ Newbie
 
Registered: Jun 2017
Posts: 4

Rep: Reputation: Disabled
How do I fix E: Sub-process /usr/bin/dpkg returned an error code (1)


Everytime I try to use apt-get -f install I get the response E: Sub-process /usr/bin/dpkg returned an error code (1). Can someone please help me with this.
 
Old 06-02-2017, 03:52 AM   #2
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 567

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
Hi, Welcome to LQ,

This error simply means dpkg failed, but from the information you gave, it is not clear why. The more information you will give more people on LQ will be able to help you.

Does it say only "Sub-process /usr/bin/dpkg returned an error code (1)" or are there more lines? Run the command and use the forum CODE construct to post the content of the terminal.

In the meantime, you might try:
Code:
sudo apt-get clean
sudo apt-get update
sudo apt-get install -f

Last edited by aragorn2101; 06-02-2017 at 03:53 AM.
 
Old 06-02-2017, 04:06 AM   #3
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
More context please. If you're running something like debian sid, that's something that happens with "still in development", and you can generally wait 24 hours and update again and it goes away. As long as your apt sources.list is not too much different from what the developers are using.

There could be other things in play like / being read-only. Or it's been sooo long since you updated that you are too far out of sync to fix that error without trickery. One trick that I've used it to change /var/lib/dpkg/status to report the questionable package as installed, then apt-get -f install, then apt-get install --reinstall that questionable package. Although normally only necessary when two packages require each other and neither will install before the other is installed. If you go with a stable branch, that is far less likely to ever occur.

One other trick is to $(ar -x package.deb) and $(tar -x... data.tar.gz) in / to basically do the steps that the installer does manually based on the packages actual contents. Basically you're doing the package management manually and bypassing the installer to fix the installer. With these tricks you can fix otherwise fatal mistakes like uninstalling libc, without needing to start from scratch. Although that would require at least one other bootable option to apply the fix.
 
Old 06-02-2017, 03:33 PM   #4
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
In my experience that dpkg code most often indicates a problem with an install script or dependency. What are you doing actually to produce the error?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
E: Sub-process /usr/bin/dpkg returned an error code (1) nardev Linux - Software 3 04-17-2013 04:01 AM
E: Sub-process /usr/bin/dpkg returned an error code (1) Sipps123 Linux - Newbie 3 12-11-2011 11:11 PM
E: Sub-process /usr/bin/dpkg returned an error code (1) cmontr Linux - Virtualization and Cloud 4 05-27-2011 07:23 PM
E: Sub-process /usr/bin/dpkg returned an error code (1) Skullnick Linux - Software 2 01-30-2010 11:27 AM
Sub-process /usr/bin/dpkg returned an error code (1) yuri16 Linux - Software 6 09-03-2009 07:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration