Sub process usr bin dpkg returned an error code 1 cydia

Cydia.app includes many error messages that might not be easy to understand at first, including error messages that come directly from Debian APT.

Cydia.app includes many error messages that might not be easy to understand at first, including error messages that come directly from Debian APT.

Here are explanations for them and how to fix the problems!

Contents

  • 1 Can’t find a source to download….
  • 2 Cydia error 255
  • 3 Cydia error 401 or 403 or 404 or 503
  • 4 Cydia is not working after installing a package
  • 5 Cydia is «preparing filesystem» and won’t load
  • 6 Could not get lock /var/lib/apt/lists/lock — open (35: Resource temporarily unavailable)
  • 7 Depends…» name of a package
  • 8 Domain #10: -72000
  • 9 dpkg was interrupted, you must manually run ‘dpkg configure -a’ to correct the problem
  • 10 Encountered a section with no Package: header
  • 11 failed in buffer_write(fd) (7, ret=-1)
  • 12 Failed to fetch «name of a repo»
  • 13 GPG error: [repository] stable Release: The following signatures were invalid: BADSIG [number]
  • 14 GPG error: [repository] stable Release: The following signatures were invalid: NODATA 1 NODATA 2
  • 15 Hash Sum mismatch
  • 16 Host Unreachable
  • 17 HTTP/1.0 403
  • 18 HTTP/1.1 403 Forbidden
  • 19 HTTP/1.1 404 Not Found
  • 20 HTTP/1.1 500 Internal Server Error
  • 21 I wasn’t able to locate file for the [package] package. This might mean you need to manually fix this package.
  • 22 Internal error, No file name for…
  • 23 POSIX error: Operation Timed Out.
  • 24 Pre-dependency problem
  • 25 Problem parsing dependency
  • 26 Read-only file system
  • 27 Size mismatch
  • 28 subprocess pre-removal script returned error exit status [number]
  • 29 The packege index file are corrupted. No filename: field for: «name of a package»
  • 30 The package «name of the package» needs to be reinstalled, but i can’t find an archive for it.
  • 31 trying to overwrite [file], which is also in package [package]
  • 32 Warning: parsing file (…) missing maintainer
  • 33 Warning: Target Packages (Packages) is configured multiple times in…
  • 34 Warning: Target Translation is configured multiple times in…
  • 35 Wow, you exceeded the number of package names this APT is capable of.

Can’t find a source to download….

Can’t find a source to download….

Kill Cydia from appswitcher and refresh your sources.

Cydia error 255

Cydia error 255

This is caused by how the jailbreak app was signed, reboot and sign it with Xcode or Altserver

Cydia error 401 or 403 or 404 or 503

Cydia error 401 or 403 or 404 or 503

The repo that is hosting the package is offline, wait till is online again.

Cydia is not working after installing a package

Cydia is not working after installing a package

Use New Term 2 or ssh and dpkg -r fun.ignition.name of the package.

Cydia is «preparing filesystem» and won’t load

Cydia is «preparing filesystem» and won’t load

Create a file in your root folder called «.cydia_no_stash»

Could not get lock /var/lib/apt/lists/lock — open (35: Resource temporarily unavailable)

Could not get lock /var/lib/apt/lists/lock — open (35: Resource temporarily unavailable)

Cydia temporarily can’t refresh data because another program is already using a system component that Cydia needs. This error commonly happens if you’re also using another program that refreshes package data, such as Curiosa. To fix it, try rebooting. If that doesn’t help, you may need to uninstall Curiosa (and any other packages that do this).

Depends…» name of a package

Depends…» name of a package

Install the dependency.

Domain #10: -72000

Domain #10: -72000

Cydia ran into some kind of network problem. The usual cause of this error message is using packages that add tons of ad-blocking lines to your hosts file; uninstalling those packages should fix this error.

dpkg was interrupted, you must manually run ‘dpkg configure -a’ to correct the problem

dpkg was interrupted, you must manually run ‘dpkg configure -a’ to correct the problem

Cydia tries to fix this problem automatically. If this is the only error message displayed, you can ignore it and use Cydia normally.

Encountered a section with no Package: header

You may want to run apt-get update to correct these problems

One or more of your installed sources is set up incorrectly. You should be able to remove the problematic source by going to Sources and tapping «Edit» at top right. If you are not sure which one to remove, try removing all of them except the defaults (BigBoss, Cydia/Telesphoreo, Dev Team, ModMyi, and ZodTTD/MacCiti).

failed in buffer_write(fd) (7, ret=-1)

failed in buffer_write(fd) (7, ret=-1)
Sub-process /usr/bin/dpkg returned an error code (1)

There is not enough disk space (on the system or user partitions or both) for Cydia to install this package. Try removing some files first, such as large bootlogo or theme files; you may need to use iFile, OpenSSH, or some other way to access the filesystem. You can also check iFile’s trash folder (/var/mobile/Library/iFile/Trash). You can go to the Cydia homepage and tap «Storage Information» to check available space on both the system and user partitions.

Failed to fetch «name of a repo»

Failed to fetch «name of a repo»

The repository is down

GPG error: [repository] stable Release: The following signatures were invalid: BADSIG [number]

GPG error: [repository] stable Release: The following signatures were invalid: BADSIG [number]

This is a minor problem with a source. You did nothing wrong and can continue to use Cydia normally.

GPG error: [repository] stable Release: The following signatures were invalid: NODATA 1 NODATA 2

GPG error: [repository] stable Release: The following signatures were invalid: NODATA 1 NODATA 2
Failed to fetch [repository] Sub-process /bin/bzip2 returned an error code (2)
Some index files failed to download, they have been ignored, or old ones used instead.

One or more of your installed sources is temporarily or permanently unavailable. You may have typed in the wrong URL, the source may have shut down, the source may be broken, or the source may be denying your connection for some other reason. Try again later. If this problem keeps happening over many days, you can remove the problematic source by going to Sources and tapping «Edit» at top right.

Hash Sum mismatch

Hash Sum mismatch

The downloaded file does not match the file on the source’s server. This is often caused by a download getting interrupted before it finished, sometimes due to network problems and sometimes due to server problems.

If you get this for many packages, try a more reliable internet connection or try again later. If your internet connection is fine for downloading other packages, including from other repositories, there may be a problem with the package or the repository. It may be helpful to report this to the repository manager.

Host Unreachable

Host Unreachable

This may mean that your internet connection is not working, a source is not working, or something else is not working (such as the Cydia Store system). This is probably a temporary problem, so try again later.

HTTP/1.0 403

HTTP/1.0 403 This package is either paid or requires a paid package to function. If you paid: contact saurik@saurik.com for help. If not, purchase the original package.

If you get this error while trying to download a paid package you have already purchased, email saurik@saurik.com for help. If you are trying to download a paid package you have not purchased, buy it and then try downloading it again. If you are trying to download a free add-on to a paid package (for example, a package adding a new option to Color Keyboard), you have to purchase that paid package before you will be able to download this add-on.

HTTP/1.1 403 Forbidden

HTTP/1.1 403 Forbidden

Just turn off WiFi and use your cellular signal to bypasses this.

HTTP/1.1 404 Not Found

HTTP/1.1 404 Not Found

The repo is not online.

HTTP/1.1 500 Internal Server Error

HTTP/1.1 500 Internal Server Error

Something seems to be wrong with the source hosting this package. This is probably a temporary problem, so try again later.

I wasn’t able to locate file for the [package] package. This might mean you need to manually fix this package.

I wasn’t able to locate file for the [package] package. This might mean you need to manually fix this package.

This is a generic error that means something went wrong. This may happen if you try to install a package while fresh data is downloading from your repositories (the stage right before «Reloading Data»). Try going to the Changes tab, tapping «Refresh» at top left, waiting for data to finish downloading, waiting for Reloading Data to complete, and then installing this package again.

Internal error, No file name for…

Internal error, No file name for…

Kill Cydia from appswitcher and refresh your sources.

POSIX error: Operation Timed Out.

POSIX error: Operation Timed Out.
POSIX: Socket is not connected.
NetDB: Open nodename nor servname provided, or not known.

Cydia is working properly, but something is wrong with your device’s connection to one or more of your installed sources. Your internet connection may not be working properly, or the source may not be working properly. Check your internet connection and try again later.

Pre-dependency problem

Pre-dependency problem

install all the dependencies first and then the tweak.

Problem parsing dependency

Problem parsing dependency Pre-Depends or Problem parsing dependency Depends
Error occurred while processing [repository]
Problem with MergeList [file]
The package lists or status file could not be parsed or opened

One or more of your installed sources is set up incorrectly. (This is a problem with that source, not with Cydia.) You should be able to remove the problematic source by going to Sources and tapping «Edit» at top right.

Read-only file system

Read-only file system

In terminal/via SSH, try running the following:

su
alpine (if u never changed it)
fsck -f -n

Once done, reboot and re-run the jailbreak and it should work.

Size mismatch

Size mismatch

The downloaded file does not match the file on the source’s server. This is often caused by a download getting interrupted before it finished, sometimes due to network problems and sometimes due to server problems.

If you get this for many packages, try a more reliable internet connection or try again later. If your internet connection is fine for downloading other packages, including from other repositories, there may be a problem with the package or the repository. It may be helpful to report this to the repository manager.

subprocess pre-removal script returned error exit status [number]

subprocess pre-removal script returned error exit status [number] or subprocess dpkg-deb —fsys-tarfile returned error exit status [number] or similar
Sub-process /usr/bin/dpkg returned an error code (1)

Something seems to be wrong with this package. Tap «Author» at the top of the package page and email the developer (and ideally the repository manager as well) to let them know about the problem and ask for help.

The packege index file are corrupted. No filename: field for: «name of a package»

The packege index file are corrupted. No filename: field for: «name of a package»

Remove the repo that is hosting that package

The package «name of the package» needs to be reinstalled, but i can’t find an archive for it.

The package «name of the package» needs to be reinstalled, but i can’t find an archive for it.

Use New Term 2 or ssh and run dpkg —remove —force-remove-reinstreq «name of the package» and then run dkpg —configure -a

trying to overwrite [file], which is also in package [package]

trying to overwrite [file], which is also in package [package]
Sub-process /usr/bin/dpkg returned an error code (1)

You are trying to install a new package that contains the same filenames as a package you already have installed, so you cannot install this new package. You can usually avoid this problem by avoiding (or uninstalling) illegally copied versions of packages.

Warning: parsing file (…) missing maintainer

Warning: parsing file (…) missing maintainer

This is safe to ignore. Pirated tweaks usually are the culprit to this issue.

Warning: Target Packages (Packages) is configured multiple times in…

Warning: Target Packages (Packages) is configured multiple times in…

You have a duplicate repo, follow the path and remove the duplicate repo.

Warning: Target Translation is configured multiple times in…

Warning: Target Translation is configured multiple times in…

You have a duplicate repo list, follow the path and remove the duplicate repo list.

Wow, you exceeded the number of package names this APT is capable of.

Wow, you exceeded the number of package names this APT is capable of.
Problem with MergeList [file]
The package lists or status file could not be parsed or opened.

This happens if you are using an old Cydia version (before 1.1.10) and have too many packages available from your installed sources. You will need to refresh your sources and update all relevant packages, so that you get the latest versions of Cydia and associated packages — but in order to do that, you’ll first need to fix this error. The error means that you have more than 65,535 packages available from your installed sources, and your old version of Cydia cannot handle that many. Go to Manage, tap Sources, tap «Edit» at top right, and remove some sources. Make sure to keep the default repositories (BigBoss, Cydia/Telesphoreo, ModMyi, and ZodTTD/MacCiti). If some sources don’t have a «remove» button when you try to remove them, that usually means they were installed as packages. Go to Manage, tap Packages, find the package with the source’s name, and uninstall that package. After removing a few extra sources, you should be able to refresh data without this error.

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.

Содержание

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

Источник

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.

Понравилась статья? Поделить с друзьями:
  • Sub or function not defined vba excel ошибка
  • Sv0368 serial data error
  • Su42118 6 ошибка
  • Sv0364 soft phase alarm ошибка fanuc
  • Suzuki ошибка p0707