Sub process usr bin dpkg returned an error code 1 linux

Содержание
  1. How To Solve ” sub process usr bin dpkg returned an error code 1″ Error?
  2. Reconfigure Package Database
  3. Install Forcefully
  4. Remove Error Causing Package
  5. Overwrite Other Packages File
  6. Auto Remove Unneeded Packages
  7. 6 thoughts on “How To Solve ” sub process usr bin dpkg returned an error code 1″ Error?”
  8. Как решить ошибку “sub process usr bin dpkg returned an error code 1″ в Ubuntu
  9. Решение проблемы Sub-process /usr/bin/dpkg returned an error code (1)
  10. Способ 1: переконфигурировать базу данных пакетов
  11. Способ 2: Использовать принудительную установку
  12. Способ 3. Попробуйте удалить проблемный пакет.
  13. Способ 4. Удалите информационные файлы с информацией о проблемном пакете
  14. How To Solve “sub process usr bin dpkg returned an error code 1″ Error in Ubuntu
  15. Fixing Sub-process /usr/bin/dpkg returned an error code (1)
  16. Method 1: Reconfigure Package Database
  17. Method 2: Use force install
  18. Method 3: Try removing the troublesome package
  19. Method 4: Remove post info files of the troublesome package
  20. Which method worked for you (if it worked)?
  21. About Abhishek Prakash
  22. How to Solve “Sub-process /usr/bin/dpkg returned an error code (1)” In Ubuntu
  23. Solution 1: Reconfiguring the dpkg Package
  24. Solution 2: Force Install the Troublesome Package
  25. Solution 3: Purge the Bad or Corrupted Software Package
  26. Solution 4: Remove all the Files Associated with the Package
  27. If You Appreciate What We Do Here On TecMint, You Should Consider:

How To Solve ” sub process usr bin dpkg returned an error code 1″ Error?

dpkg is a tool used to install packages into a Debian, Ubuntu, Mint, Kali or deb based distribution. Generally package managers works without problem. But in some situations there may be some errors about package installation. One of the most popular dpkg error is sub process usr bin dpkg returned an error code 1 . In this tutorial we will look different ways to solve this error.

Reconfigure Package Database

One of the first way is configuring package database. Package database holds installed package related information. If an package installation is interrupted this database may become corrupt. We need to repair and reconfigure this package database with the following command.

Install Forcefully

Some package installation may be interrupted and can not complete the installation because of the existing cache. We need to install forcefully which can be implemented like below.

Remove Error Causing Package

Some times some similar job packages can be overlapped. In this situation we should need to remove the package which is all ready installed. We can get this package name from error messages. In this example we assume the package name is getdeb-repository .

Overwrite Other Packages File

Another solution to this error is forcing overwrite to the package which creates problem.

Auto Remove Unneeded Packages

We can remove unneeded packages with the autoremove command like below. This is safe command which will clean cache for unused packages.

6 thoughts on “How To Solve ” sub process usr bin dpkg returned an error code 1″ Error?”

Thanks for your solution. I have implemented altos of solution many time but didn’t work. Your solution worked in one try. Great job

Hi Mohammad,
Thanks for your appreciation.
Have a nice day.

$ sudo dpkg –configure -a
Setting up runit (2.1.2-3ubuntu1) …
start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
dpkg: error processing package runit (–configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of git-daemon-run:
git-daemon-run depends on runit; however:
Package runit is not configured yet.

dpkg: error processing package git-daemon-run (–configure):
dependency problems – leaving unconfigured
Errors were encountered while processing:
runit
git-daemon-run
(base) [email protected]:

$ sudo apt-get install -f
Reading package lists… Done
Building dependency tree
Reading state information… Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up runit (2.1.2-3ubuntu1) …
start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
dpkg: error processing package runit (–configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of git-daemon-run:
git-daemon-run depends on runit; however:
Package runit is not configured yet.

Читайте также:  Обои mac os 1600x900

dpkg: error processing package git-daemon-run (–configure):
dependency problems – leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
runit
git-daemon-run
E: Sub-process /usr/bin/dpkg returned an error code (1)
(base) [email protected]:

$ sudo apt-get remove –purge getdeb-repository
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package getdeb-repository
(base) [email protected]:

$ sudo dpkg -i –force-overwrite /var/cache/apt/archives/libogremain-1.7.3_1.7.3-ogredev-natty3_i386.deb
dpkg: error processing archive /var/cache/apt/archives/libogremain-1.7.3_1.7.3-ogredev-natty3_i386.deb (–install):
cannot access archive: No such file or directory
Errors were encountered while processing:
/var/cache/apt/archives/libogremain-1.7.3_1.7.3-ogredev-natty3_i386.deb
(base) [email protected]:

$ sudo apt autoremove
Reading package lists… Done
Building dependency tree
Reading state information… Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up runit (2.1.2-3ubuntu1) …
start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
dpkg: error processing package runit (–configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of git-daemon-run:
git-daemon-run depends on runit; however:
Package runit is not configured yet.

dpkg: error processing package git-daemon-run (–configure):
dependency problems – leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
runit
git-daemon-run
E: Sub-process /usr/bin/dpkg returned an error code (1)
.
.
.
// still its not solved what is the solution ?//

try running “sudo apt-get update && upgrade -y”
then try “sudo apt autoremove”
then rerun the command and see if that helps if it doesn’t please get back to me.

Thank you. It helped me solve the problem as well… In addition, I had to run the update manager again to fix the problem after running sudo dpkg –configure -a on the terminal.

Источник

Как решить ошибку “sub process usr bin dpkg returned an error code 1″ в Ubuntu

Если вы столкнулись с ошибкой с «sub process usr bin dpkg returned an error code 1» при установке программного обеспечения на Ubuntu Linux, вот как вы можете это исправить.

Одной из распространенных проблем в Ubuntu и других дистрибутивах на основе Debian являются ломанные пакеты.

Вы пытаетесь обновить систему или установить новый пакет, и столкиваеиесь с такой ошибкой, как «Sub-process /usr/bin/dpkg returned an error code 1.

Вот что случилось на днях.

Я пытался установить радио приложение на Ubuntu, и система вернула мне эту ошибку:

Здесь важны последние три строки:

Это говорит мне, что пакет полярная polar-bookshelf является причиной . Это может иметь решающее значение для устранения этой ошибки.

Решение проблемы Sub-process /usr/bin/dpkg returned an error code (1)

Попробуем исправить этот сломанный пакет.

Я покажу вам несколько методов, которые вы можете попробовать по одному.

Они простые в использовании и просто без проблем осуществимы.

Вы должны попытаться запустить sudo apt update, а затем попытаться установить новый пакет или обновиться после каждого из описанных здесь методов.

Способ 1: переконфигурировать базу данных пакетов

Первый метод, который вы можете попробовать, – перенастроить базу данных пакетов.

Вероятно, база данных повреждена при установке пакета.

Реконфигурация часто устраняет проблему.

Способ 2: Использовать принудительную установку

Если установка ранее прервалась, вы можете попробовать установить пакет принудительно:

Способ 3. Попробуйте удалить проблемный пакет.

Способ 4. Удалите информационные файлы с информацией о проблемном пакете

Это должно быть вашим последним прибежищем.

Вы можете попробовать удалить файлы, связанные с пакетом, из /var/lib/dpkg/info.

Вам нужно немного узнать о базовых командах Linux, чтобы выяснить, что происходит, и как использовать их с вашей проблемой.

Читайте также:  Папка windows apps не удаляется

В моем случае у меня была проблема с polar-bookhelof.

Источник

How To Solve “sub process usr bin dpkg returned an error code 1″ Error in Ubuntu

Last updated August 20, 2020 By Abhishek Prakash 335 Comments

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.

Like what you read? Please share it with others.

Filed Under: Tutorial Tagged With: Update error

About Abhishek Prakash

Creator of It’s FOSS. An ardent Linux user & open source promoter. Huge fan of classic detective mysteries ranging from Agatha Christie and Sherlock Holmes to Detective Columbo & Ellery Queen. Also a movie buff with a soft corner for film noir.

thank you so much!
This one worked for me: Method 4: Remove post info files of the troublesome package

Good to hear that, Nadie.

Great post! The 5th worked for me! I had a problem with google-chrome-stable and your suggestion worked perfectly. Thanks for your help! You saved my day!

Happy to be of help, Ana. Enjoy 🙂

YES! Finally it is works! Thanks!

You are welcome

None of these fixes worked for me. I was trying to install graphic drivers for AMD but my errors are within the packages I was trying to install apparently. Along with a bunch of dependency problems. I have also tried an uninstall, a purge, a fresh driver download, a new install, I get the same error:
Sub-process /usr/bin/dpkg returned an error code (1)

Читайте также:  Компьютер останавливается при загрузке windows

I did later on learned that Ubuntu and AMD are having some issues with one another, but I had already started trying so I continued the fight, I mean I did find the right drivers for the right Ubuntu, it just would not work.

I will probably have to switch to a diferent type of Linux OS that does not interfere with my AMD graphics card. I heard Linux Mint is all the rage, might give that a try.

P.S. It was however fun to try the fixes, so thanks for the fun.

Thank you! The last solution worked for me because I have too many packages I think.

Источник

How to Solve “Sub-process /usr/bin/dpkg returned an error code (1)” In Ubuntu

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.

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 resolving this issue.

To do this, simply execute the command:

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 -f option as shown.

The -f option & —fix-broken 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.

For example, in my case, purging the Google chrome package fixed the issue.

Then invoke the commands below to remove all the old, unused, and unnecessary packages which also frees up space on your hard drive.

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.

After listing the files, you can move them to the /tmp directory as shown

Alternatively, you can use the rm command to manually remove the files.

Finally, update the package lists as shown:

You can thereafter give it another shot in reinstalling the software package.

Conclusion

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.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

We are thankful for your never ending support.

Источник

Оцените статью