The other day I was testing a tool named OnionShare which is used to share files of any size securely and anonymously in Unix-like operating systems. While trying to install it in my Ubuntu test box, I encountered with this error -> "E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem". As the APT package manager suggested, I ran "sudo dpkg --configure -a", but still no luck. I got a new error message which I haven't seen in the past. The error was: "dpkg: error: parsing file '/var/lib/dpkg/updates/0014' near line 0: newline in field name '#padding'".
If you ever encountered with an error something like above, you're in good hands. Follow the steps given below to fix it. I tested this in Ubuntu 18.04 LTS desktop and server editions. I suppose this solution may work in older Ubuntu versions and other Ubuntu derivatives like Linux Mint, Elementary OS etc.
Fix "dpkg: error: parsing file '/var/lib/dpkg/updates/0014'" Error In Ubuntu
To fix this error, just remove the problematic file i.e. /var/lib/dpkg/updates/0014 in my case. Replace the file name with your own. And also, before deleting the file, make sure you have backup of the file.
$ sudo rm /var/lib/dpkg/updates/0014
Next, clean the package cache using command:
$ sudo apt-get clean
Then, update the software repositories using command:
$ sudo apt-get update
Finally, run the following command to fix the error:
$ sudo dpkg --configure -a
And, the problem is gone! I could be then able to install any software on my Ubuntu system.
Related read:
Thanks for stopping by!
Help us to help you:
- Subscribe to our Email Newsletter : Sign Up Now
- Support OSTechNix : Donate Via PayPal
- Download free E-Books and Videos : OSTechNix on TradePub
- Connect with us: Reddit | Facebook | Twitter | LinkedIn | RSS feeds
Have a Good day!!
9 comments
not work
Thank you! It worked.
Hi I have this issue with ubuntu updates I am using 18.4 ver. when I try to update I get the following error message
E: Unable to parse package file /var/lib/dpkg/status (1)
W: You may want to run apt-get update to correct these problems
E: The package cache file is corrupted.
what do I need to do to get this thing fixed?
it’s worked well. You’re amazing.
thanks
Thanks very much, worked perfectly.
Thank you! It worked.
Thank you very much, solved for me.
Thank you so much! it worked!
it’s worked well. You’re amazing.