Linux How-To

How To Resolve “sub course of usr bin dpkg returned an error code 1″ Error in Ubuntu

SEOClerks

If you’re encountering “sub course of usr bin dpkg returned an error code 1”  whereas putting in software program on Ubuntu Linux, right here is how one can repair it.

One of many frequent problem in Ubuntu and different Debian based mostly distribution is the damaged packages. You attempt to replace the system or set up a brand new package deal and also you encounter an error like ‘Sub-process /usr/bin/dpkg returned an error code’.

That’s what occurred to me the opposite day. I used to be making an attempt to put in a radio utility in Ubuntu when it threw me this error:

Unpacking python-gst-1.Zero (1.6.2-1build1) …
Deciding on beforehand unselected package deal radiotray.
Getting ready to unpack …/radiotray_0.7.Three-5ubuntu1_all.deb …
Unpacking radiotray (Zero.7.Three-5ubuntu1) …
Processing triggers for man-db (2.7.5-1) …
Processing triggers for desktop-file-utils (Zero.22-1ubuntu5.2) …
Processing triggers for bamfdaemon (Zero.5.Three~bzr0+16.04.20180209-0ubuntu1) …
Rebuilding /usr/share/purposes/bamf-2.index…
Processing triggers for gnome-menus (Three.13.Three-6ubuntu3.1) …
Processing triggers for mime-support (Three.59ubuntu1) …
Establishing polar-bookshelf (1.Zero.Zero-beta56) …
ln: didn’t create symbolic hyperlink ‘/usr/native/bin/polar-bookshelf’: No such file or listing
dpkg: error processing package deal polar-bookshelf (–configure):
subprocess put in post-installation script returned error exit standing 1
Establishing python-appindicator (12.10.1+16.04.20170215-0ubuntu1) …
Establishing python-gst-1.Zero (1.6.2-1build1) …
Establishing radiotray (Zero.7.Three-5ubuntu1) …
Errors had been encountered whereas processing:
polar-bookshelf
E: Sub-process /usr/bin/dpkg returned an error code (1)

The final three strains are of the utmost significance right here.

Errors had been encountered whereas processing:
polar-bookshelf
E: Sub-process /usr/bin/dpkg returned an error code (1)

It tells me that the package deal polar-bookshelf is inflicting and problem. This may be essential to the way you repair this error right here.

Fixing Sub-process /usr/bin/dpkg returned an error code (1)

Fix update errors in Ubuntu Linux

Fix update errors in Ubuntu Linux

Let’s attempt to repair this damaged error package deal. I’ll present a number of strategies which you can attempt one after the other. The preliminary ones are straightforward to make use of and easily no-brainers.

You need to attempt to run sudo apt replace after which attempt to set up a brand new package deal or improve after making an attempt every of the strategies mentioned right here.

Methodology 1: Reconfigure Bundle Database

The primary methodology you may attempt is to reconfigure the package deal database. In all probability the database bought corrupted whereas putting in a package deal. Reconfiguring usually fixes the issue.

sudo dpkg –configure -a

Methodology 2: Use pressure set up

If a package deal set up was interrupted beforehand, you could attempt to do a pressure set up.

sudo apt-get set up -f

Methodology Three: Strive eradicating the troublesome package deal

If it’s not a problem for you, you could attempt to take away the package deal manually. Please don’t do it for Linux Kernels (packages beginning with linux-).

sudo apt take away

Methodology four: Take away put up data recordsdata of the troublesome package deal

This needs to be your final resort. You’ll be able to attempt eradicating the recordsdata related to the package deal in query from /var/lib/dpkg/data.

Urged learn

Mechanically Disable Touchpad When Mouse is Utilized in Ubuntu Linux [Quick Tip]

It is advisable to know a bit of about fundamental Linux instructions to determine what’s taking place and how are you going to use the identical along with your downside.

In my case, I had a problem with polar-bookshelf. So I regarded for the recordsdata related to it:

ls -l /var/lib/dpkg/data | grep -i polar-bookshelf
-rw-r–r– 1 root root 2324811 Aug 14 19:29 polar-bookshelf.record
-rw-r–r– 1 root root 2822824 Aug 10 04:28 polar-bookshelf.md5sums
-rwxr-xr-x 1 root root 113 Aug 10 04:28 polar-bookshelf.postinst
-rwxr-xr-x 1 root root 84 Aug 10 04:28 polar-bookshelf.postrm

Now all I wanted to do was to take away these recordsdata:

sudo mv /var/lib/dpkg/data/polar-bookshelf.* /tmp

Use the sudo apt replace after which it’s best to be capable of set up software program as typical.

Which methodology labored for you (if it labored)?

I hope this fast article helps you in fixing the ‘E: Sub-process /usr/bin/dpkg returned an error code (1)’ error. 

If it did be just right for you, which methodology was it? Did you handle to repair this error with another methodology? If sure, please share that to assist others with this problem.

Source link

Related Articles

Back to top button