How to fix “Package operation failed” Error in Ubuntu
Lately, I was trying to update the Oracle VirtualBox to its latest version. But, It didn’t co-operate with me and end up with following error.
Package operation failed The installation or removal of a software package failed.
It wasn’t the first time I got this kind of error. I have had this error so many times, and I have fixed it too by searching on the Ubuntu forums and Google. But this time I forgot how I solved it in the past. So, I decided to document the procedure, so that someone can use if they have the same issue.
Well, let me show you how I did it.
I opened the Terminal and ran the following commands one by one.
sudo apt-get update
sudo apt-get clean
sudo apt-get autoremove
sudo apt-get update && sudo apt-get upgrade
sudo dpkg --configure -a
sudo apt-get install -f
When I executed the last command, I got the following error.
[...] E: Sub-process /usr/bin/dpkg returned an error code (1)
However, I opened the Software Updater from the Menu. This time it displayed a message: The update has already been already downloaded.
Cool then. I just hit the Install now button. The installation went good and completed without any issues.
Hurrah!! I made it. I updated the Oracle VirtualBox successfully.
That’s all for now. Hope you find it useful.
Thanks for stopping by. See you again with another interesting article soon.