User/bin/pdkg error code 0

user/bin/pdkg error code 0

When you upgrade the system or install a software package, you may encounter the 'Sub-process /usr/bin/dpkg returned an error code' error. E: Sub-process /usr/bin/dpkg returned an error code (100) Ubuntu Linux установлено 0 новых пакетов, для удаления отмечено 0 пакетов. Here's first three results when I googled that: https://ubuntuforums.org/showthread.php?t=2416238.

User/bin/pdkg error code 0 - agree

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)

Fix update errors in Ubuntu Linux

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)?

Donate Itsfoss

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.

apt-key add - #echo"deb http://nightly.odoo.com/10.0/nightly/deb/ ./" >> /etc/apt/sources.list.d/odoo.list # apt-get update && apt-get install odoo

It seems to install everything fine but at the end I am getting this:

Setting up odoo (10.0.20170403) ...

chown: cannot access '/var/lib/odoo': No such file or directory dpkg: error processing package odoo (--configure):

 subprocess installed post-installation script returned error exit status 1 Processing triggers for libc-bin (2.23-0ubuntu5) ...

Processing triggers for systemd (229-4ubuntu16) ...

Processing triggers for ureadahead (0.100.0-19) ...

Errors were encountered while processing:

 odoo E: Sub-process /usr/bin/dpkg returned an error code (1)

1Answer

I found the solution. you just have to create the folder:

# mkdir /var/lib/odoo