Finally i found a solution for my problem. run following commands in your terminal one after other. Here i have problem with mysql package. Fixing Sub-process /usr/bin/dpkg returned an error code (1) · Method 1: Reconfigure Package Database · Method 2: Use force install · Method 3: Try removing the. In this post, I share the latest step-by-step tutorial to E: Sub-process /usr/bin/dpkg returned an error code (100) could not exec dpkg.
Sub-process /usr/bin/dpkg returned an error code 100 - advise you
If you are encountering “sub process usr bin dpkg returned an error code 1” while installing software on Ubuntu Linux, here is how you can fix it.
One of the common issue in Ubuntu and other Debian based distribution is the broken packages. You try to update the system or install a new package and you encounter an error like ‘Sub-process /usr/bin/dpkg returned an error code’.
That’s what happened to me the other day. I was trying to install a radio application in Ubuntu when it threw me this error:
The last three lines are of the utmost importance here.
It tells me that the package polar-bookshelf is causing and issue. This might be crucial to how you fix this error here.
Fixing Sub-process /usr/bin/dpkg returned an error code (1)
Let’s try to fix this broken error package. I’ll show several methods that you can try one by one. The initial ones are easy to use and simply no-brainers.
You should try to run sudo apt update and then try to install a new package or upgrade after trying each of the methods discussed here.
Method 1: Reconfigure Package Database
The first method you can try is to reconfigure the package database. Probably the database got corrupted while installing a package. Reconfiguring often fixes the problem.
Method 2: Use force install
If a package installation was interrupted previously, you may try to do a force install.
Method 3: Try removing the troublesome package
If it’s not an issue for you, you may try to remove the package manually. Please don’t do it for Linux Kernels (packages starting with linux-).
Method 4: Remove post info files of the troublesome package
This should be your last resort. You can try removing the files associated to the package in question from /var/lib/dpkg/info.
You need to know a little about basic Linux commands to figure out what’s happening and how can you use the same with your problem.
In my case, I had an issue with polar-bookshelf. So I looked for the files associated with it:
Now all I needed to do was to remove these files:
Use the sudo apt update and then you should be able to install software as usual.
Which method worked for you (if it worked)?
I hope this quick article helps you in fixing the ‘E: Sub-process /usr/bin/dpkg returned an error code (1)’ error.
If it did work for you, which method was it? Did you manage to fix this error with some other method? If yes, please share that to help others with this issue.
It’s not uncommon to run into an issue of broken packages in Ubuntu and other Debian-based distributions. Sometimes, when you upgrade the system or install a software package, you may encounter the ‘Sub-process /usr/bin/dpkg returned an error code’ error.
For example, a while back, I tried to upgrade Ubuntu 18.04 and I bumped into the dpkg error as shown below.Errors were encountered while processing: google-chrome-stable E: Sub-process /usr/bin/dpkg returned an error code (1)
This indicates that the google-chrome-stable package is either broken or corrupt. There are a few workarounds to this problem, so don’t throw in the towel yet or discard your system.
Solution 1: Reconfiguring the dpkg Package
One of the triggers of this error is a corrupted dpkg database. This can be caused by the sudden interruption of the installation of a software package. Reconfiguring the database is one way to resolve this issue.
To do this, simply execute the command:$ sudo dpkg --configure -a
This reconfigures the unpacked packages that were not installed during the installation process.
Solution 2: Force Install the Troublesome Package
Sometimes, errors can occur during the installation of software packages. When such happens, you can force install the package using the option as shown.$ sudo apt install -f OR $ sudo apt install --fix-broken
The option & can be interchangeably used to fix broken dependencies resulting from an interrupted package or cached package download.
Solution 3: Purge the Bad or Corrupted Software Package
If the first two solutions did not fix the problem, you can remove or purge the problematic software package as shown.$ sudo apt remove --purge package_name
For example, in my case, purging the Google chrome package fixed the issue.$ sudo apt remove --purge google-chrome-stable
Then invoke the commands below to remove all the old, unused, and unnecessary packages which also frees up space on your hard drive.$ sudo apt clean $ sudo apt autoremove
Solution 4: Remove all the Files Associated with the Package
Lastly, you can manually remove all the associated with the troublesome package. First, you need to find these files which are located in the /var/lib/dpkg/info directory as shown.$ sudo ls -l /var/lib/dpkg/info
sudo apt update
sudo apt upgrade
How to fix Sub-process returned an error code (100) in Cydia
Tons of users are reporting a weird “Sub-process returned an error code (100)” message on iOS 11-11.1.2 firmware. Here’s how you can fix this error on your iPhone, iPad, and iPod touch.
Saurik blocks Cydia Installer upgrades on Electra jailbreak
Jay Freeman aka Saurik, the creator of Cydia, has blocked updates for core packages. The package that is breaking the update right now is APT 7.0.
Whenever a user tries to upgrade this essential package, Cydia will throw the “subprocess” error.
Here’s how this error message looks like.
sub-process returned an error code (100)
Method /usr/lib/apt/methods/https did not start correctly
Method http has died unexpectedly!
Saurik has purposely pushed an update for APT to break users’ devices.
As you already know,Saurik and Coolstar have a long-standing beef that is yet to show any signs of cooling down.
He clearly doesn’t want users to enjoy Electra jailbreak, which is developed by a competitor.
Thankfully, you can fix this error code by downgrading to APT version 0.7.25.3-15 (thanks to Notex for pointing this out). Here’s how you can do that manually.
- Update – You can now download a safe update of APT 0.7 Strict version 0.7.25.3.16-coolstar from Electra’s default repository. Don’t install version 0.7.25.3.15 from Saurik’s default repository.
- Update – Saurik didn’t intend to break Coolstar’s jailbreak. Cydia displayed errors because this update was aimed at iOS 10, not iOS 11.
- An affected iPhone, iPad, or iPod touch
- Electra jailbreak toolkit
- A computer running Windows (optional)
- Filza file manager (optional)
Fixing Sub-process returned an error code (100) error message on iOS 11-11.1.2
1. Transfer APT 0.7 Strict (lib) package
Step 1 Download the core APT v7.0 Debian package from this link.
Step 2 Copy this Debian package to the “/private/var/tmp” folder of your device’s filesystem.You can use WinSCP (recommended) or Filza file manager for this purpose.
- WinSCP users – Enter your details and press Login to start an SFTP session. Download the Debian package to your computer and drag it from your computer’s filesystem (left section) to your device’s root folder (right section. If you are unable to connect, try using port number 2222.
- Filza – Simply search for the file using “apt7” and transfer it to the root (/) folder.
Enter “root” as the user name and “alpine” as the password without quotes.
- Important – Ensure your device is in jailbreak mode before you start an SFTP session.
2 .SSH into your device
Step 3 SSH into your device using iTerminal App Store application. Thankfully enough, Electra comes with OpenSSH so you can use SSH whenever you want to.
Step 4 Enter the following details and tap Connect once everything is ready.
3. Perform the downgrade
Step 5 Run the following command once you are in the terminal. Ensure you press the “return” key after typing to execute it.
dpkg -i apt7-lib_0.7.25.3-15_iphoneos-arm.deb
killall -9 SpringBoard
That’s pretty much it! The APT package is now successfully downgraded and you can continue installing tweaks with Cydia. The “Sub-process returned an error code (100)” message will no longer bug you.
If you get the following error message, you can safely ignore it.
warning: unable to delete old directory ‘/usr/lib/apt/methods’: Directory not empty
If SSH is not working for you, try using the method laid out in the comments by user Panayiotis C. below.
Automatic removal using shell script (recommended)
This method relies on a shell script and works on-device without a PC or computer.
- Download the fix.sh shell script developed by Ariel from here. If you are unable to download it, open the link using Safari web browser on your Apple device.
- Download the Debian package using the link given in the first section above.
- Launch FilzaEscaped file manager and copy the aforementioned files to /private/var/root.
- Tap the “i” icon present next to the script file.
- Scroll down, tap on Sticky, and change the permissions of this file to 0777.
- Tap on fix.sh to run the shell script.
- Once the script runs, delete both the files from “step 1” and “step 2” from Filza.
- Cydia will now start working as usual.
The following steps are optional but highly recommended.
How to protect Cydia from Saurik’s updates
Step 1 Launch Cydia.
Step 2 Go to the Installed section.
Step 3 Tap on APT 0.7 Strict (lib) package.
Step 4 Tap Change Package Settings.
Step 5 Enable Ignore Upgrades.
This will block any future upgrades by Saurik or by anyone else. No one will be able to ruin your jailbreak fun anymore! Once Saurik properly updates Cydia, you can switch on the “upgrades” again.
If you run into errors while trying this tutorial out, leave a comment below.
For more jailbreak tips and tricks, don’t forget to like and follow us on Facebook and Twitter.
This in turn will generate a list of all references to the package you installed.
Now you would need to delete them by entering the command :
sudo mv /var/lib/dpkg/info/package_name.* /tmp
The files will be removed to the /tmp directory .Now, run a sudo apt the update in order to be able to install the software again on a clean slate :
sudo apt-get update
Solution : 6 : Clean up unused Software Packages
Try to remove unused application packages by running the command :
sudo apt autoremove
For more on the cleanup solution, you may want read our article:How to keep Ubuntuclean.
If you like the content, we would appreciate your support by buying us a coffee. Thank you so much for your visit and support.
Amin Nahdy, an aspiring software engineer and a computer geek by nature as well as an avid Ubuntu and open source user. He is interested in information technology especially Linux based ecosystem as well as Windows and MacOS. He loves to share and disseminate knowledge to others in a transparent and responsible way.
Tags: command sudo apt-get remove --purge package_name,command sudo apt-get remove --purge your_problematic_package,command sudo apt-get update && sudo apt-get dist-upgrade -y,command sudo dpkg --configure -a,command sudo software-properties-gtk,error sub process usr/bin/dpkg returned an error code 1
After listing the files, you can move them to the /tmp directory as shown$ sudo mv /var/lib/dpkg/info/package-name.* /tmp
Alternatively, you can use the rm command to manually remove the files.$ sudo rm -r /var/lib/dpkg/info/package-name.*
Finally, update the package lists as shown:$ sudo apt update
You can thereafter give it another shot in reinstalling the software package.
This type of dpkg error points to an issue with the package installer usually caused by the interruption of an installation process or a corrupt dpkg database.
Any of the above-mentioned solutions should fix this error. If you have come this far, then it’s our hope that the issue has been successfully resolved and that you were able to reinstall your software package.