Amdgpu dkms e sub process usr bin dpkg returned an error code 1

Have an error with dpkg? Updated guide on How to fix the error ”sub process usr bin dpkg returned an error code 1" in Ubuntu. Solve this issue now, quickly!

Introduction

The error message “Sub-process /usr/bin/dpkg returned an error code (1)” indicates a problem with the package installer. This can happen in Ubuntu after a failed software installation, or if the installer becomes corrupted.

The key phrase in this error is /usr/bin/dpkg. This refers to the dpkg package installer for Linux. A package installer is an application that tracks software, updates, and dependencies. If it is damaged, any new software installation will cause this error message.

We cover several possible solutions, from easily-solved and straightforward solutions to more complex processes. This guide will help you resolve the dpkg returned an error code 1 on an Ubuntu operating system.

how to fix subprocess error code

Prerequisites

  • A user account with sudo privileges
  • A terminal window/command-line (CtrlAltT)
sub-process returned an error code ubuntu update

Method 1: Reconfigure dpkg Database

If your package database has become corrupted, reconfiguring it can repair it.

Enter the following command:

sudo dpkg --configure -a

This command reconfigures packages that have been unpacked but not necessarily installed. An interruption at the wrong time can cause this database to become corrupt. This is especially helpful if you were running installation and the process was interrupted.

Method 2: Force-Install the Software

If Method 1 does not work, you can attempt to fix the dependencies in the package installer.

Enter the following:

sudo apt-get install -f

The -f option means fix-broken. It repairs any broken dependencies in your package manager. Broken dependencies occur when a download is interrupted, or there is a problem with the cached download.

Note: Dependencies are other software packages that are required by the software you are installing. A package manager helps keep track of dependencies for you.

Method 3: Remove Bad Software Package

If you know which software caused the errors on your system, you can remove it.

Enter the command and package_name with the name of the software that is causing the problem:

sudo apt-get remove --purge package_name

The --purge option directs the system to remove config files in addition to uninstalling. This helps get rid of all traces of the offending software.

Method 4: Clean Out Unused Software Packages

If an old, outdated, or unused package is causing the problem, you can solve the problem by removing unused software packages.

Enter the following command in the terminal:

sudo apt autoremove

Note: Avoid the next 2 options unless all other methods have failed.

Method 5: Remove Post Files

If you know the name of the package that is causing problems, you can delete the files manually. The installation files are usually located in the /var/lib/dpkg/info file.

Type in the following command and replace package_name with the name of the broken software.:

sudo ls -l /var/lib/dpkg/info | grep -i package_name

This will generate a list of all references to the software you installed.

You can then remove them by entering:

sudo mv /var/lib/dpkg/info/package_name.* /tmp

This command moves the files to the /tmp directory, where they cannot affect your package manager.

Next, update the package manager:

sudo apt-get update

After which you can re-install the broken software again.

Method 6: Overwrite Package File

If you know the name of the package that is causing a problem, you can force an overwrite.

Use the following command and replace full_name_of_package with the actual package name:

sudo dpkg -i --force-overwrite /var/cache/apt/archives/full_name_of_package

Note: If you do not know the actual name of the package, you can search for it with the following command:

ls /var/cache/apt/archies/*package_name*

Replace package_name with the name of your software. This should return any instances of that package name. Note the exact filename, and type it into the previous command.

Conclusion

The dpkg error message indicates that there is a problem with the package installer, which is  commonly caused by an interrupted installation process or a corrupted database.

By following these steps, you should now have several methods to fix the dpkg error message and attain a working package installer.

I tried following this guide to install the amdgpu-pro drivers on Ubuntu 18.10 however the install failed saying the drivers are for 18.04 only.

https://linuxconfig.org/how-to-install-amd-radeon-drivers-on-ubuntu-18-10-cosmic-cuttlefish-linux

Now apt has compltely borken when I try to run apt upgrade I get the following error message:

 /tmp/apt-dpkg-install-4A1LcU/03-amdgpu-core_19.20-812932_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I tried sudo dpkg --configure -a however this returns a large list of dependency errors because Package amdgpu-core is not installed.

I then tried apt install -f to fix the issue but got the error:

ERROR: This package can only be installed on Ubuntu 18.04.
dpkg: error processing archive /var/opt/amdgpu-pro-local/./amdgpu-core_19.20-812932_all.deb (--unpack):
 new amdgpu-core package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 /var/opt/amdgpu-pro-local/./amdgpu-core_19.20-812932_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I then tried apt autoremove to clean this up but I get the error:

E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

So I ran that command sudo apt --fix-broken install and get yet more errors:

Preparing to unpack .../amdgpu-core_19.20-812932_all.deb ...
ERROR: This package can only be installed on Ubuntu 18.04.
dpkg: error processing archive /var/opt/amdgpu-pro-local/./amdgpu-core_19.20-812932_all.deb (--unpack):
 new amdgpu-core package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 /var/opt/amdgpu-pro-local/./amdgpu-core_19.20-812932_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

So I seem to be stuck in a loop that I can’t get out of. Doe’s anyone know what I need to do so I can get this removed and apt working again?

Всем доброго дня!

Очень вери нид хэлп ;(

Предыстория.
После установки Ubu 21.04 на моём HP ноуте HP 15=bw518ur при загрузке стала яркость 30%. Но менялась в верхнем баре и FN на нужную и держалась до перезагрузки. Перепробовал многие рецепты — толку 0. Но работало и ладно, менял каждый раз при загрузке.

Обновился до 21.10 (пробовал ставить новую чистую копию на другой диск с 0 — аналогично). При загрузке xorg сразу срывало изображение, либо загружалось нормально, но при выходе из хранителя экрана, сна или гибернации — срыв изображения. Работало нормально в Wayland. Но после очередного обновления ядра, стало срывать и в Wayland. Решил, что проблема в дровах и совместимости с видюхой:

*-display UNCLAIMED       
       описание: VGA compatible controller
       продукт: Stoney [Radeon R2/R3/R4/R5 Graphics]
       производитель: Advanced Micro Devices, Inc. [AMD/ATI]
       физический ID: 1
       сведения о шине: pci@0000:00:01.0
       версия: da
       разрядность: 64 bits
       частота: 33MHz
       возможности: pm pciexpress msi vga_controller bus_master cap_list
       конфигурация: latency=0
       ресурсы: память:e0000000-efffffff память:f0800000-f0ffffff ioport:5000(размер=256) память:f0500000-f053ffff память:c0000-dffff
  *-display UNCLAIMED
       описание: Display controller
       продукт: Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430 / Radeon 520 Mobile]
       производитель: Advanced Micro Devices, Inc. [AMD/ATI]
       физический ID: 0
       сведения о шине: pci@0000:01:00.0
       версия: 83
       разрядность: 64 bits
       частота: 33MHz
       возможности: pm pciexpress msi cap_list
       конфигурация: latency=0
       ресурсы: память:d0000000-dfffffff память:f0400000-f043ffff ioport:4000(размер=256) память:f0440000-f045ffff
Погуглил и напоролся на дрова от ATi Radeon™ Software for Linux® 21.30. Загрузил, установил. При установке получаю ошибку:

Настраивается пакет amdgpu-dkms (1:5.11.19.98-1290604) …
Removing old amdgpu-5.11.19.98-1290604 DKMS files...

------------------------------
Deleting module version: 5.11.19.98-1290604
completely from the DKMS tree.
------------------------------
Done.
Loading new amdgpu-5.11.19.98-1290604 DKMS files...
Building for 5.13.0-21-generic
Building for architecture x86_64
Building initial module for 5.13.0-21-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/amdgpu-dkms-fir
mware.0.crash'
Error! Bad return status for module build on kernel: 5.13.0-21-generic (x86_64)
Consult /var/lib/dkms/amdgpu/5.11.19.98-1290604/build/make.log for more informat
ion.
dpkg: ошибка при обработке пакета amdgpu-dkms (--configure):
 installed amdgpu-dkms package post-installation script subprocess returned erro
r exit status 10
dpkg: зависимости пакетов не позволяют настроить пакет amdgpu:
 amdgpu зависит от amdgpu-dkms (= 1:5.11.19.98-1290604), однако:
  Пакет amdgpu-dkms пока не настроен.

dpkg: ошибка при обработке пакета amdgpu (--configure):
 проблемы зависимостей — оставляем не настроенным
Отчёт apport не записан, так как сообщение об ошибке указывает на повторную ошиб
ку от предыдущего отказа.
                         При обработке следующих пакетов произошли ошибки:
 amdgpu-dkms
 amdgpu
E: Sub-process /usr/bin/dpkg returned an error code (1)

При этом — система работает стабильно, изображение не срывает, но… не регулируется яркость. Совсем. Не реагирует вообще ни на что. Попытался снести эти драйвера и после перезагрузки не грузятся иксы. Пыпадаю в терминал, логинюсь, реконфигурю иксы и хрен. Восстанавливаю эти дрова и всё работает, акромя яркости.

Вопрос — можно ли пофиксить работу с этими дровами, либо как их снести к чёртовой матери и загрузить открытые дрова, что Ubuntu ставит. video-radeon не находится в репо.

Буду безумно признателен. Глаза вылазиют уже. А работать надо ;(

I have tried to run sudo apt-get dist-upgrade but at the end I am getting this output:

Loading new amdgpu-5.6.0.15-1098277 DKMS files...
Building for 5.11.0-40-generic 5.13.0-30-generic
Building for architecture x86_64
Building initial module for 5.11.0-40-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/amdgpu-dkms-firmware.0.crash'
Error! Bad return status for module build on kernel: 5.11.0-40-generic (x86_64)
Consult /var/lib/dkms/amdgpu/5.6.0.15-1098277/build/make.log for more information.
dpkg: error processing package amdgpu-dkms (--configure):
 installed amdgpu-dkms package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of amdgpu:
 amdgpu depends on amdgpu-dkms (= 1:5.6.0.15-1098277); however:
  Package amdgpu-dkms is not configured yet.

dpkg: error processing package amdgpu (--configure):
 dependency problems - leaving unconfigured
Setting up gir1.2-polkit-1.0 (0.105-26ubuntu1.3) ...
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.7) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for dbus (1.12.16-2ubuntu2.1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
Errors were encountered while processing:
 amdgpu-dkms
 amdgpu
E: Sub-process /usr/bin/dpkg returned an error code (1)

The /var/lib/dkms/amdgpu/5.6.0.15-1098277/build/make.log is too comprehensive to post here I think, but here are few last lines:

cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:288: /var/lib/dkms/amdgpu/5.6.0.15-1098277/build/ttm/ttm_bo_manager.o] Error 1
make[1]: *** [scripts/Makefile.build:519: /var/lib/dkms/amdgpu/5.6.0.15-1098277/build/ttm] Error 2
make: *** [Makefile:1849: /var/lib/dkms/amdgpu/5.6.0.15-1098277/build] Error 2
make: Leaving directory '/usr/src/linux-headers-5.11.0-40-generic'

I am using a laptop with dedicated nvidia GPU, but most of the time running on integrated AMD GPU. Another problem which I have posted here recently was with no video signal from any port (usb-c, hdmi). I haven’t worked that out yet, but it may be related somehow.

When I’m uninstalling something via Ubuntu Software i get a popup saying:

Unable to remove "app_name":
Error while installing package: installed amdgpu-dkms package
post-installation script subprocess returned error exit status 10

EDIT:

apt-cache policy amdgpu amdgpu-dkms output:

amdgpu:
  Installed: 20.20-1098277
  Candidate: 20.20-1098277
  Version table:
 *** 20.20-1098277 1000
        500 file:/var/opt/amdgpu-pro-local ./ Packages
        100 /var/lib/dpkg/status
amdgpu-dkms:
  Installed: 1:5.6.0.15-1098277
  Candidate: 1:5.6.0.15-1098277
  Version table:
 *** 1:5.6.0.15-1098277 1000
        500 file:/var/opt/amdgpu-pro-local ./ Packages
        100 /var/lib/dpkg/status

dkms status output:

amdgpu, 5.6.0.15-1098277: added

uname -r output:

5.11.0-40-generic

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:

Unpacking python-gst-1.0 (1.6.2-1build1) ...
Selecting previously unselected package radiotray.
Preparing to unpack .../radiotray_0.7.3-5ubuntu1_all.deb ...
Unpacking radiotray (0.7.3-5ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5.2) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20180209-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Setting up polar-bookshelf (1.0.0-beta56) ...
ln: failed to create symbolic link '/usr/local/bin/polar-bookshelf': No such file or directory
dpkg: error processing package polar-bookshelf (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up python-appindicator (12.10.1+16.04.20170215-0ubuntu1) ...
Setting up python-gst-1.0 (1.6.2-1build1) ...
Setting up radiotray (0.7.3-5ubuntu1) ...
Errors were encountered while processing:
polar-bookshelf
E: Sub-process /usr/bin/dpkg returned an error code (1)

The last three lines are of the utmost importance here.

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

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.

sudo dpkg --configure -a

Method 2: Use force install

If a package installation was interrupted previously, you may try to do a force install.

sudo apt-get install -f

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

sudo apt remove package_name

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:

ls -l /var/lib/dpkg/info | grep -i polar-bookshelf
-rw-r--r-- 1 root root 2324811 Aug 14 19:29 polar-bookshelf.list
-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 needed to do was to remove these files:

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

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.

Содержание

  1. Как решить ошибку “sub process usr bin dpkg returned an error code 1″ в Ubuntu
  2. Решение проблемы Sub-process /usr/bin/dpkg returned an error code (1)
  3. Способ 1: переконфигурировать базу данных пакетов
  4. Способ 2: Использовать принудительную установку
  5. Способ 3. Попробуйте удалить проблемный пакет.
  6. Способ 4. Удалите информационные файлы с информацией о проблемном пакете
  7. How to Solve “Sub-process /usr/bin/dpkg returned an error code (1)” In Ubuntu
  8. Solution 1: Reconfiguring the dpkg Package
  9. Solution 2: Force Install the Troublesome Package
  10. Solution 3: Purge the Bad or Corrupted Software Package
  11. Solution 4: Remove all the Files Associated with the Package
  12. If You Appreciate What We Do Here On TecMint, You Should Consider:
  13. Fix “Sub-process /usr/bin/dpkg returned an error code (1)” In Ubuntu
  14. Fix «Sub-process /usr/bin/dpkg returned an error code (1)» In Ubuntu
  15. Solution 1 — Reconfigure dpkg database
  16. Solution 2 — Force install the application
  17. Solution 3 — Remove the problematic application .deb file from the local cache folder and reinstall it
  18. Solution 4 — Remove the problematic application
  19. How to Fix sub-process /usr/bin/dpkg returned an error code (1) in Ubuntu
  20. Options to Fix sub-process /usr/bin/dpkg returned an error code (1)
  21. Method 1: Reconfigure dpkg Database
  22. Method 2: Force-Install the Software
  23. Method 3: Remove Bad Software Package
  24. Method 4: Clean Out Unused Software Packages
  25. Method 5: Remove Post Files
  26. Method 6: Overwrite Package File
  27. Please help! Sub-process /usr/bin/dpkg returned an error code (1) Installing MySQL on Ubuntu
  28. 2 Answers 2
  29. There can be Multiple Solutions for the Above
  30. 1. Reconfiguring the dpkg Package
  31. 2. Force Install the Troublesome Package
  32. 3. Purge the Bad or Corrupted Software Package
  33. 4. Remove all the Files Associated with the Package
  34. The Error You are getting is Mysql is unable to install coz port 3306 is already in use.

Как решить ошибку “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, чтобы выяснить, что происходит, и как использовать их с вашей проблемой.

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

Источник

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 resolve 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.

Tutorial Feedback.

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.

Источник

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

Today I tried to upgrade my Ubuntu 20.04 LTS desktop and I encountered with this error — «Sub-process /usr/bin/dpkg returned an error code (1)». It is one of the common issue in Ubuntu and other DEB-based systems.

This error usually happens due to a failed application installation, or if the dpkg package installer becomes corrupted or interrupted in mid-way while installing a package.

Here are the commands that I tried to upgrade my Ubuntu desktop:

And. here is the error message:

Fix «Sub-process /usr/bin/dpkg returned an error code (1)» In Ubuntu

If you encountered with an error like above, worry not! Here, I have given a few workarounds to solve «Sub-process /usr/bin/dpkg returned an error code (1)» issue in Ubuntu and its variants such as Linux Mint, Pop OS.

Solution 1 — Reconfigure dpkg database

If the package installation process is stopped or interrupted in mid-way, the dpkg database might be corrupted. Reconfiguring dpkg database may solve this issue.

To reconfigure dpkg database, simply run:

This command will try to fix the corrupted dpkg database and then reconfigure all broken packages. This command usually fixes the dpkg returned an error code (1) problem. If it didn’t solve the issue for any reason, follow the subsequent solutions.

Solution 2 — Force install the application

If the first method didn’t work, run the following command to perform force install:

Here, -f (or —fix-broken ) option will attempt to correct the Ubuntu system with broken dependencies.

If these two solutions didn’t help and the issue still persists, try the next solution.

Solution 3 — Remove the problematic application .deb file from the local cache folder and reinstall it

As you see in the error message (the last two lines), the eog package is causing this error.

For those wondering, eog (short for Eye of GNOME) is the official and default image viewer for the GNOME desktop environment. So this package is problematic and doesn’t let me to upgrade my Ubuntu.

When you install a package, it will be downloaded and saved in the cache folder /var/cache/apt/archives/ .

To fix this error, remove the cached package using command:

Replace eog_3.36.2-0ubuntu1_amd64.deb with your package.

Clean the package cache folder:

Update the source lists:

Upgrade your system:

Finally, get the fresh package from official repositories and reinstall it like below:

This solution worked for me.

Solution 4 — Remove the problematic application

This should be your last resort. If none of the above methods help, remove the problematic package from your system like below:

This command will remove eog with all its configuration files from the system.

And also find and remove all files associated with the broken package.

To find all files related to a package, run:

Sample output:

Remove them manually.

That’s it. At this stage, any one of the these four solutions should have helped you to fix «Sub-process /usr/bin/dpkg returned an error code (1)» in Ubuntu and other DEB-based systems.

Solutions to other common problems in Ubuntu:

Источник

How to Fix sub-process /usr/bin/dpkg returned an error code (1) in Ubuntu

Home » SysAdmin » How to Fix sub-process /usr/bin/dpkg returned an error code (1) in Ubuntu

The error message “Sub-process /usr/bin/dpkg returned an error code (1)” indicates a problem with the package installer. This can happen in Ubuntu after a failed software installation, or if the installer becomes corrupted.

The key phrase in this error is /usr/bin/dpkg. This refers to the dpkg package installer for Linux. A package installer is an application that tracks software, updates, and dependencies. If it is damaged, any new software installation will cause this error message.

We cover several possible solutions, from easily-solved and straightforward solutions to more complex processes. This guide will help you resolve the dpkg returned an error code 1 on an Ubuntu operating system.

  • A user account with sudo privileges
  • A terminal window/command-line (CtrlAltT)

Options to Fix sub-process /usr/bin/dpkg returned an error code (1)

Method 1: Reconfigure dpkg Database

If your package database has become corrupted, reconfiguring it can repair it.

Enter the following command:

This command reconfigures packages that have been unpacked but not necessarily installed. An interruption at the wrong time can cause this database to become corrupt. This is especially helpful if you were running installation and the process was interrupted.

Method 2: Force-Install the Software

If Method 1 does not work, you can attempt to fix the dependencies in the package installer.

Enter the following:

The -f option means fix-broken. It repairs any broken dependencies in your package manager. Broken dependencies occur when a download is interrupted, or there is a problem with the cached download.

Note: Dependencies are other software packages that are required by the software you are installing. A package manager helps keep track of dependencies for you.

Method 3: Remove Bad Software Package

If you know which software caused the errors on your system, you can remove it.

Enter the command and package_name with the name of the software that is causing the problem:

The —purge option directs the system to remove config files in addition to uninstalling. This helps get rid of all traces of the offending software.

Method 4: Clean Out Unused Software Packages

If an old, outdated, or unused package is causing the problem, you can solve the problem by removing unused software packages.

Enter the following command in the terminal:

Note: Avoid the next 2 options unless all other methods have failed.

Method 5: Remove Post Files

If you know the name of the package that is causing problems, you can delete the files manually. The installation files are usually located in the /var/lib/dpkg/info file.

Type in the following command and replace package_name with the name of the broken software.:

This will generate a list of all references to the software you installed.

You can then remove them by entering:

This command moves the files to the /tmp directory, where they cannot affect your package manager.

Next, update the package manager:

After which you can re-install the broken software again.

Method 6: Overwrite Package File

If you know the name of the package that is causing a problem, you can force an overwrite.

Use the following command and replace full_name_of_package with the actual package name:

Note: If you do not know the actual name of the package, you can search for it with the following command:

Replace package_name with the name of your software. This should return any instances of that package name. Note the exact filename, and type it into the previous command.

The dpkg error message indicates that there is a problem with the package installer, which is commonly caused by an interrupted installation process or a corrupted database.

By following these steps, you should now have several methods to fix the dpkg error message and attain a working package installer.

Источник

Please help! Sub-process /usr/bin/dpkg returned an error code (1) Installing MySQL on Ubuntu

I’m trying to install mysql with Ubuntu and I’ve spent the last 3 days purging MySQL and redownloading to no avail. Most of the solutions I found didn’t work for me, and they are all some variation of deleting MySQL and redownloading. Ive tried manually going into the files and manually deleting all MySQL related files too. Any help would be appreciated!

I’ve also tried reinstalling some dpkg files but as you can tell I’m pretty new to this.

This is my error log

Here is the result of mount | grep proc

$ sudo mount | grep proc proc on /proc type proc (rw,nosuid,nodev,noexec,noatime) binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)

2 Answers 2

There can be Multiple Solutions for the Above

1. Reconfiguring the dpkg Package

One of the triggers of this error is a corrupted dpkg database. Can be fixed by sudo dpkg —configure -a

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.

3. Purge the Bad or Corrupted Software Package

sudo apt remove —purge package_name

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.

sudo ls -l /var/lib/dpkg/info | grep -i package_name

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

sudo mv /var/lib/dpkg/info/package-name.* /tmp

Finally, update the package lists.

sudo apt update

And then try to reinstall your Package.

The Error You are getting is Mysql is unable to install coz port 3306 is already in use.

You could use netstat -lp | grep 3306 to find out what program is already listening on port 3306 (you should see PID/Program name in last column) and stop that (maybe mysql is already running?).

Источник

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.

Errors were encountered while processing:
google-chrome-stable
E: Sub-process /usr/bin/dpkg returned an error code (1)

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

To do this, simply execute the command:

$ sudo dpkg --configure -a

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.

$ sudo apt install -f
OR
$ sudo apt install --fix-broken

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.

$ sudo apt remove --purge package_name

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

$ sudo apt remove --purge google-chrome-stable

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

$ sudo apt clean
$ sudo apt autoremove

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.

$ sudo ls -l /var/lib/dpkg/info | grep -i package_name

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

$ sudo mv /var/lib/dpkg/info/package-name.* /tmp

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

$ sudo rm -r /var/lib/dpkg/info/package-name.*

Finally, update the package lists as shown:

$ sudo apt update

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.

Support Us

We are thankful for your never ending support.

Если вы столкнулись с ошибкой  с «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, и система вернула мне эту ошибку:

Unpacking python-gst-1.0 (1.6.2-1build1) ...
Selecting previously unselected package radiotray.
Preparing to unpack .../radiotray_0.7.3-5ubuntu1_all.deb ...
Unpacking radiotray (0.7.3-5ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5.2) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20180209-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Setting up polar-bookshelf (1.0.0-beta56) ...
ln: failed to create symbolic link '/usr/local/bin/polar-bookshelf': No such file or directory
dpkg: error processing package polar-bookshelf (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up python-appindicator (12.10.1+16.04.20170215-0ubuntu1) ...
Setting up python-gst-1.0 (1.6.2-1build1) ...
Setting up radiotray (0.7.3-5ubuntu1) ...
Errors were encountered while processing:
polar-bookshelf
E: Sub-process /usr/bin/dpkg returned an error code (1)

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

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

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

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

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

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

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

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

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

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

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

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

sudo dpkg --configure -a

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

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

sudo apt-get install -f

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

sudo apt remove 

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

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

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

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

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

Поэтому я искал файлы, связанные с ним:

ls -l /var/lib/dpkg/info | grep -i polar-bookshelf
-rw-r--r-- 1 root root 2324811 Aug 14 19:29 polar-bookshelf.list
-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

Теперь мне нужно удалить эти файлы:

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

I have error in apt-get install
it is a error:

The following packages have unmet dependencies:
 gcc-4.8-multilib : Depends: libc6-dev-i386 (>= 2.11) but it is not going to be installed
 libc6-dev-x32 : Depends: libc6-dev-i386 (= 2.19-0ubuntu6.6) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

I try several command
like: apt-get -f install
apt-get clean

I try change my source list, and remake apt-get update

$ sudo apt-get install g++
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 gcc-4.8-multilib : Depends: libc6-dev-i386 (>= 2.11) but it is not going to be installed
 libc6-dev-x32 : Depends: libc6-dev-i386 (= 2.19-0ubuntu6.6) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

in apt-get -f install

$ sudo apt-get -f install 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  libc6-dev-i386
The following NEW packages will be installed:
  libc6-dev-i386
0 upgraded, 1 newly installed, 0 to remove and 434 not upgraded.
3 not fully installed or removed.
Need to get 0 B/1.148 kB of archives.
After this operation, 6.333 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 194963 files and directories currently installed.)
Preparing to unpack .../libc6-dev-i386_2.19-0ubuntu6.6_amd64.deb ...
Unpacking libc6-dev-i386 (2.19-0ubuntu6.6) ...
dpkg: error processing archive /var/cache/apt/archives/libc6-dev-i386_2.19-0ubuntu6.6_amd64.deb (--unpack):
 trying to overwrite '/usr/include/bits', which is also in package libc6-dev-amd64 2.19-0ubuntu6.6
Errors were encountered while processing:
 /var/cache/apt/archives/libc6-dev-i386_2.19-0ubuntu6.6_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

asked Jun 5, 2015 at 23:56

user3815068's user avatar

2

The same dpkg error is also possible when uninstalling:

apt-get uninstall

and

apt-get purge

First, uninstall the package:

rm -f /var/lib/dpkg/info/<package-name>*
apt-get purge <package-name>

Afterwards you can re-install it:

apt-get install <package-name>

Massimo's user avatar

Massimo

2,9322 gold badges28 silver badges40 bronze badges

answered Apr 17, 2018 at 9:07

rapaelec's user avatar

rapaelecrapaelec

1,22812 silver badges10 bronze badges

0

Try this. Open a new terminal and paste it

sudo dpkg -i --force-overwrite  /var/cache/apt/archives/libc6-dev-i386_2.19-0ubuntu6.6_amd64.deb

After that type:

sudo apt-get autoremove

Lastly type

sudo apt-get update

hope your problem will be solved.

answered Jul 12, 2015 at 6:33

orvi's user avatar

orviorvi

3,0441 gold badge22 silver badges36 bronze badges

none of the solutions i could find solved the problem for me…still broken packes, no matter the autoremove, -f install … and so forth.

After playing around a little, the following solved it for me:

sudo apt-get --purge remove libc6-dev-i386 libc6-dev-x32 gcc-5-multilib gcc-multilib

sudo apt autoremove -f

sudo apt-get -f install

Alfred Huang's user avatar

Alfred Huang

17.2k32 gold badges118 silver badges187 bronze badges

answered Oct 29, 2016 at 13:52

David's user avatar

DavidDavid

2552 silver badges8 bronze badges

1

Try the following steps from the terminal :

 sudo apt-get --purge remove libc6-dev-amd64 

 sudo apt-get -f install

 sudo apt-get update

Hope this will fix your issues.

Jai Chauhan's user avatar

Jai Chauhan

3,8153 gold badges36 silver badges58 bronze badges

answered Aug 14, 2015 at 13:34

Basheer.O's user avatar

Basheer.OBasheer.O

4775 silver badges8 bronze badges

1

Try is to reconfigure the package database. Probably the database got corrupted while installing a package.
sudo dpkg --configure -a

answered Dec 27, 2018 at 11:18

Aditya Pawaskar's user avatar

I found my solution, because the others quoted below did not work. Generally, it is a conflict with a dependency already installed.

I solved this problem with these command for recreate blank configuration (debian) :

  • sudo mv /var/lib/dpkg/info /var/lib/dpkg/info_silent
  • sudo mkdir /var/lib/dpkg/info
  • sudo apt-get update
  • sudo apt-get -f install <xxxx>

answered Aug 22, 2022 at 12:42

Sacha Durand's user avatar

Sacha DurandSacha Durand

1771 gold badge2 silver badges8 bronze badges

It looks like you have installed libc6-dev-amd64 and you are trying to install packages that depend on libc6-dev-i386, and these two are in conflict (they both contain /usr/include/bits).

My guess is you don’t want both of these installed at the same time. I would use apt-get remove libc6-dev-amd64 to get yourself back to a good state, and then try again to install the packages that you want.

If those two packages are meant to work when they’re both installed at the same time, then file a bug with the package maintainer because they need to fix the packages to allow that.

Jai Chauhan's user avatar

Jai Chauhan

3,8153 gold badges36 silver badges58 bronze badges

answered Jun 6, 2015 at 0:17

Ewan Mellor's user avatar

Ewan MellorEwan Mellor

6,6081 gold badge23 silver badges39 bronze badges

1

When the upgrade command (sudo apt-get upgrade -y) is run in Ubuntu 18.04.3 (With Linux kernel version 5.7.14) the following errors get reported (in red):

... bind /var/run/spice-vdagentd/spice-vdagent-sock: No such file or directory
... Fatal could not create server socket /var/run/spice-vdagentd/spice-vdagent-sock
...
... Failed to start Agent daemon for Spice guests.

The following steps fixed the issue:

  1. Make spice-vdagentd directory if it does not exist:
> sudo mkdir /var/run/spice-vdagentd (if it does not exist)
  1. Open a new file spice-vdagent-sock
> sudo vi /var/run/spice-vdagentd/spice-vdagent-sock
  1. Save the file by running: :wq
  2. Re-run the upgrade command to verify that the issue is fixed.

answered Dec 3, 2020 at 23:49

BR M's user avatar

BR MBR M

917 bronze badges

Using below steps my problem resolve in «Oracle VM VirtualBox Manager»

  1. apt autoremove

  2. apt purge libreoffice-base libreoffice-core

  3. dpkg -l «libreoffice» | grep «^ii»

  4. sudo dpkg —configure -a

  5. sudo apt-get install -f

now you can try to install — pip3 install jupyter etc.

answered Dec 14, 2020 at 12:33

Vijay's user avatar

VijayVijay

1317 bronze badges

You can fix this problem with this command:

 sudo apt-get remove --purge libreoffice-core libreoffice-common
python3-uno libreoffice-*

NelsonGon's user avatar

NelsonGon

12.9k6 gold badges27 silver badges57 bronze badges

answered Jul 20, 2016 at 17:37

Talat Parwez's user avatar

1

Like this post? Please share to your friends:
  • Amd ошибка 182 как решить
  • Amd ошибка 173 не видит видеокарту
  • Amd user experience program data uploader ошибка
  • Amd storemi installation failed error code 65536 как исправить
  • Amd software ошибка 211