Tag: package managers

Error “error: failed to commit transaction (invalid or corrupted package)” (SOLVED)

When using pacman while updating packages, for example

sudo pacman -Syu

An error may occur:

error: binutils: signature from "Frederik Schwan <frederik.schwan@linux.com>" is unknown trust
:: File /var/cache/pacman/pkg/binutils-2.39-4-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n]

If you choose the proposed option – remove an invalid or damaged package – then the update will fail with the following error:

error: failed to commit transaction (invalid or corrupted package)
Errors occurred, no packages were upgraded.

The specific error message in your case may be different, for example, another package may be invalid or corrupted, or the PGP signature may belong to another person.

In any case, to fix the error, start by reinstalling the archlinux-keyring package:

sudo pacman -S archlinux-keyring

After that, the system update should pass without error.

sudo pacman -Syu

Error “TypeError: ‘AURPackageInfo’ does not have attribute ‘submitter’” (SOLVED)

pikaur is a utility for facilitating the installation and updating of programs from the AUR. You can read more about pikaur in the article “Automatic installation and update of AUR packages”.

pikaur's options are similar to pacman, but you don't need to use sudo. For example, updating all packages is done with the following command:

pikaur -Syu

On my Arch Linux (BlackArch) I once got the following error:

Reading AUR packages info...
  File "/usr/lib/python3.10/site-packages/pikaur/main.py", line 369, in main
  File "/usr/lib/python3.10/site-packages/pikaur/main.py", line 272, in cli_entry_point
  File "/usr/lib/python3.10/site-packages/pikaur/core.py", line 417, in run_with_sudo_loop
    raise catched_exc
  File "/usr/lib/python3.10/site-packages/pikaur/core.py", line 411, in run_with_sudo_loop
    result = main_thread.get()
  File "/usr/lib/python3.10/multiprocessing/pool.py", line 774, in get
    raise self._value
  File "/usr/lib/python3.10/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/usr/lib/python3.10/site-packages/pikaur/main.py", line 136, in cli_install_packages
  File "/usr/lib/python3.10/site-packages/pikaur/install_cli.py", line 186, in __init__
  File "/usr/lib/python3.10/site-packages/pikaur/install_cli.py", line 193, in main_sequence
  File "/usr/lib/python3.10/site-packages/pikaur/install_cli.py", line 273, in get_all_packages_info
    self.install_info = InstallInfoFetcher(
  File "/usr/lib/python3.10/site-packages/pikaur/install_info_fetcher.py", line 71, in __init__
  File "/usr/lib/python3.10/site-packages/pikaur/install_info_fetcher.py", line 212, in get_all_packages_info
  File "/usr/lib/python3.10/site-packages/pikaur/install_info_fetcher.py", line 468, in get_aur_pkgs_info
    aur_updates_list, not_found_aur_pkgs = find_aur_updates()
  File "/usr/lib/python3.10/site-packages/pikaur/updates.py", line 125, in find_aur_updates
    aur_pkgs_info, not_found_aur_pkgs = find_aur_packages(package_names)
  File "/usr/lib/python3.10/site-packages/pikaur/aur.py", line 184, in find_aur_packages
    results = [request.get() for request in requests]
  File "/usr/lib/python3.10/site-packages/pikaur/aur.py", line 184, in <listcomp>
    results = [request.get() for request in requests]
  File "/usr/lib/python3.10/multiprocessing/pool.py", line 774, in get
    raise self._value
  File "/usr/lib/python3.10/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/usr/lib/python3.10/site-packages/pikaur/aur.py", line 143, in aur_rpc_info_with_progress
    result = aur_rpc_info(search_queries)
  File "/usr/lib/python3.10/site-packages/pikaur/aur.py", line 133, in aur_rpc_info
    return [
  File "/usr/lib/python3.10/site-packages/pikaur/aur.py", line 134, in <listcomp>
    AURPackageInfo(**{key.lower(): value for key, value in aur_json.items()})
  File "/usr/lib/python3.10/site-packages/pikaur/aur.py", line 60, in __init__
  File "/usr/lib/python3.10/site-packages/pikaur/core.py", line 88, in __init__
    setattr(self, key, value)
  File "/usr/lib/python3.10/site-packages/pikaur/core.py", line 102, in __setattr__
    raise TypeError(

TypeError: 'AURPackageInfo' does not have attribute 'submitter'

To fix this error, you need to reinstall pikaur. To reinstall pikaur, run the following commands:

git clone https://github.com/actionless/pikaur.git
cd pikaur
makepkg -fsri

If an error occurs

fatal: destination path 'pikaur' already exists and is not an empty directory.

Then instead of the previous ones, run the following commands:

cd pikaur
git pull
makepkg -fsri

In my case, when installing pikaur, the following dependencies were additionally installed:

  • python-mdurl
  • python-pep517
  • python-uc-micro-py
  • python-build
  • python-installer
  • python-markdown-it-py

After that, pikaur began to work without errors.

dpkg: error: fgets gave an empty string from ‘/var/lib/dpkg/triggers/Unincorp’ (SOLVED)

When trying to use the apt package manager, for example:

sudo apt install linux-image-amd64

An error occurred:

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

The error is caused by disk problems or package upgrade failure.

When trying to use the recommended command:

sudo dpkg --configure -a

There was another error:

dpkg: error: fgets gave an empty string from '/var/lib/dpkg/triggers/Unincorp'
E: Sub-process /usr/bin/dpkg returned an error code (2)

To fix the issue, run the following commands:

sudo rm /var/lib/dpkg/triggers/Unincorp
sudo touch /var/lib/dpkg/triggers/Unincorp
sudo dpkg --configure -a

After that, run

sudo dpkg --configure -a

Error “error: GPGME error: No data. error: failed to synchronize all databases (unexpected error)” (SOLVED)

When updating the package cache with the pacman package manager, for example, when running the following command to update package information and update the system:

sudo pacman -Syu

An error may occur:

error: GPGME error: No data
:: Synchronizing package databases...
 core                  155.5 KiB   444 KiB/s 00:00 [######################] 100%
 extra is up to date
 community is up to date
 multilib is up to date
 blackarch is up to date
error: GPGME error: No data
error: failed to synchronize all databases (unexpected error)

To fix the error, run the following command:

sudo rm -R /var/lib/pacman/sync

And then run the system update command again:

sudo pacman -Syu

This time the error should be gone.

Cause “error: GPGME error: No data. error: failed to synchronize all databases (unexpected error)” may be the following situation: you have exhausted the limit of your Internet connection and instead of the requested data, your Internet provider shows its page with information about the need to replenish the balance. As a result, incorrect data is sent in response to outgoing Internet connections, although the connection is successful from the point of view of the computer.

That is, pacman asks for information about the packages, but the ISP sends the data to show the Captive Portal. As a result of this, pacman has the indicated error. To fix it, you need to delete the cached data, which is done by the above command.

error: blackarch: signature from “Levon ‘noptrix’ Kayan (BlackArch Developer) ” is invalid (SOLVED)

When trying to update Arch Linux with BlackArch repositories with the command

sudo pacman -Syu

an error occurred:

error: blackarch: signature from "Levon 'noptrix' Kayan (BlackArch Developer) <noptrix@nullsecurity.net>" is invalid

The error message says that the signature of one of the BlackArch developers is not valid.

To solve this error, just delete the /var/lib/pacman/sync/blackarch.db.sig file:

sudo rm /var/lib/pacman/sync/blackarch.db.sig

Then run the update as usual:

sudo pacman -Syu

The error no longer occurs:

I don't know exactly what caused this problem, perhaps a file corruption due to a network problem during a system update.

After updating the information from the package repositories, the /var/lib/pacman/sync/blackarch.db.sig file was recreated and the error no longer occurred. That is, there is no need to worry that your Linux will lose any functionality.

How to download a package without installation in Arch Linux and Manjaro. How to download the AUR package source code

How to download a package with pacman (from standard repositories)

To download a package without installing it, use the -w option:

sudo pacman -Sw PACKAGE

By default, the package will be downloaded to pacman's package cache directory, with the --cachedir option you can specify any other directory to save the package to:

sudo pacman -Sw --cachedir DIRECTORY PACKAGE

For example, the following command will download the iw package installation file to the current directory (--cachedir .):

sudo pacman -Sw --cachedir . iw

How to download an installation package and source code from the AUR

See also:

Packages from the Arch User Repository (AUR) are not so simple, since there are no ready-made installation packages in the AUR. Instead of installation packages, the AUR necessarily contains PKGBUILD files, which contain commands for building the package to be installed. In addition to the PKGBUILD file, other necessary files may also be present, such as patches for modifying the source code. Source code files and binaries are usually absent from the AUR repositories, instead, links and commands for downloading all necessary files and source code are written in the PKGBUILD file.

Therefore, there may be several options for downloading AUR packages:

  • package repository (PKGBUILD file and other related files)
  • all files needed to build the package (source code files and other files downloaded in PKGBUILD)
  • a ready-to-install package that is not available elsewhere and is built directly on the user's computer

Let's consider all these situations.

How to download the AUR repository

To download (clone) a repository from the AUR, you need to know its URL. The repository address can be viewed with a command like:

pikaur-Si PACKAGE

For example:

pikaur -Si deadbeef-git

In the output of the previous command, notice the line “AUR Git URL”:

AUR Git URL     : https://aur.archlinux.org/deadbeef-git.git

To download (clone) use the following command:

git clone AUR_GIT_URL

For example:

git clone https://aur.archlinux.org/deadbeef-git.git

How to download AUR source code

Consider the following problem:

I need to change the source code in the program (meaning not the PKGBUILD file). How to download source files and unzip them?

To download the source code, you need to start by cloning the AUR repository, for this you need to know its URL. The repository address can be viewed with a command like:

pikaur-Si PACKAGE

For example:

pikaur -Si deadbeef-git

In the output of the previous command, notice the line “AUR Git URL”:

AUR Git URL     : https://aur.archlinux.org/deadbeef-git.git

To download (clone) use the following command:

git clone AUR_GIT_URL

For example:

git clone https://aur.archlinux.org/deadbeef-git.git

Go to the folder with the downloaded repository

cd deadbeef-git/

To download and extract files, use the following command:

makepkg -o

If you want to skip dependency checking, then add the -d option:

makepkg -od

The result of the previous commands will be to download the source code files needed to build the setup file from the AUR.

You can edit the files to suit your needs, and then build the installation file and install the package from it with the following command:

makepkg -si

If, as a result of your actions, the package cannot be built due to a checksum mismatch, then use the following options:

  --nocheck        Do not run the check() function in the PKGBUILD
  --skipchecksums  Do not verify checksums of the source files
  --skipinteg      Do not perform any verification checks on source files
  --skippgpcheck   Do not verify source files with PGP signatures

How to download the installation file from the AUR

As mentioned above, this is a slightly incorrect formulation of the problem, since the installation files are missing in the AUR.

To get the installation file, use the following set of commands:

git clone AUR_GIT_URL
makepkg -s

For example, downloading the source code, compiling the program, and building the installation package for deadbeef-git:

git clone https://aur.archlinux.org/deadbeef-git.git
cd deadbeef-git/
makepkg -s

The command completed without errors:

As a result of the command, a file with the *.pkg.tar.zst extension was created (in this case, it is deadbeef-git-r10944.4469d86c7-1-x86_64.pkg.tar.zst):

“Error: failed to commit transaction (invalid or corrupted package)” (SOLVED)

When updating or installing packages in Arch Linux, Manjaro and their derivatives, you may encounter the “error: failed to commit transaction (invalid or corrupted package). Errors occurred, no packages were upgraded.” issue.

Full error log:

:: Retrieving packages...
 libinih-55-2-x86_64                                15.4 KiB   385 KiB/s 00:00 [############################################] 100%
(40/40) checking keys in keyring                                               [############################################] 100%
(40/40) checking package integrity                                             [############################################] 100%
error: libinih: signature from "Maxime Gauduin <alucryd@gmail.com>" is marginal trust
:: File /var/cache/pacman/pkg/libinih-55-2-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] y
error: failed to commit transaction (invalid or corrupted package)
Errors occurred, no packages were upgraded.

In this case, the error occurs when trying to update the libinih package, but it can occur for other packages as well.

First, try delete the package, as recommended, and run the update again to download the installation package file. This will resolve the issue if the error is caused by a corrupted package, such as a network outage.

If this does not help, then instead of a complete update of the system, run the update of the archlinux-keyring package:

sudo pacman -Sy archlinux-keyring

This should fix the PGP signature verification issue.

This error and the problem with incorrect PGP signature can occur on systems that are rarely updated (updated with long breaks). The error lies in the fact that packages with “invalid” PGP signatures are signed with keys that are contained in the updated version of the archlinux-keyring package. Therefore, by starting with updating archlinux-keyring you get new versions of the keys, which then successfully verify the PGP signatures of the package files.

Is it safe to remove configuration files left over from removed packages? (SOLVED)

What does the package status “[residual-config]” mean?

When searching the package repository using the apt utility, you may encounter programs that have a status like this instead of “installed” or not installed.


See also: How to check if a package is installed on Linux Mint

There can be quite a lot of such files.

This raises the question: is it safe to delete such files, will this lead to unexpected failures in the programs? If these files can be removed, then how can this be done for all packages whose configuration files remain in the system at once?

apt autoremove”, as well as “apt clean” and “apt autoclean”, do not help to remove these files because the packages have already been removed.

Is it safe to delete settings files

To begin with, we note that if the package has the status “[residual-config]”, then it has already been removed and, therefore, cannot work. For this reason, deleting its configuration file will mean that if you want to install the same package in the future, you may need to configure the package again.

To display a list of packages that have been removed from the system, but for which configuration files remain, run the program:

dpkg -l | grep '^rc' | awk '{print $2}'

I ended up with a rather long list that didn't even fit on the screen. That said, most of the list is made up of packages that I never want to install again: previous versions of the kernel, previous versions of PHP, previous versions of the MariaDB server and client.

However, upon closer examination of the list, I found phpMyAdmin in it, which I installed and actually use. That is, this package was removed automatically, most likely during a major update of the PHP version. So not only do I not want to delete the phpMyAdmin config files, I re-installed the package. That is, do not rush to mindlessly remove the configuration files of missing packages – at least take a quick look at it.

Note that a package with the status “[residual-config]” is considered to be installed even if any of its files other than configuration files are missing. In a practical sense, this means that the dependencies of these already removed packages are still stored in the system. Therefore, after clearing the configuration files, the package is considered permanently removed. And this can lead to the fact that the dependencies that were installed automatically are no longer required. For this reason, launch

sudo apt autoremove

may cause packages to be removed.

This is usually not a problem as it removes automatically installed packages that are no longer needed by any of the programs. But if there are packages that are no longer needed, check the list of configuration files to clean up even more carefully – there may be something useful there, as in my case it was phpMyAdmin.

How much space will be freed up when clearing settings files

As for the question of how much this is necessary, users have different opinions. One user wrote that deleting the configuration files for 342 missing packages freed him up to just 2.6 MiB. Other users report that the configuration files filled up all the free space in the root directory. In fact, configuration files usually take up very little space and you shouldn't expect to free up a lot of disk space after deleting them.

Why settings files remain

This is not a mistake – the settings files of remote applications are saved intentionally. On Linux, installing a package from a repository can be done with a single command. But the subsequent setup, which may involve editing the configuration file, can take a long time. For this reason, the apt command has two kinds of program uninstalls:


Removes packages. Note that when a package is removed, its configuration files remain on the system.


purge is similar to remove except packages are removed and purged (any configuration files are also removed).

Thus, when you remove packages, usually using “sudo apt remove”, programs leave their configuration files on the system.

How to remove all configuration files for missing packages at once

To clear all configuration files, use the following command:

dpkg -l | grep '^rc' | awk '{print $2}' | xargs sudo apt --purge --yes remove

Do not forget to review the list of affected packages before running it, as shown above – it may turn out that, for reasons beyond your control, the packages you need were removed and you don’t want their configuration files to be removed at all.

While cleaning configuration files, you may encounter messages like:

dpkg: warning: while removing php7.3-cli, directory '/etc/php/7.3' not empty so not removed


rmdir: failed to remove '/lib/modules/5.10.0-kali4-amd64': Directory not empty

This means that these directories, in addition to the configuration files of the package, contain extraneous files. In all these cases, you need to remove the specified directories manually.

Updating packages: whether to update the config file

Consider a situation when the package manager of your Linux distribution (Debian, Linux Mint, Ubuntu, Kali Linux) asks about updating the configuration file – what to do and how to get the latest version of the configuration file? Let’s figure it out.

With some updates of some packages, the structure of the configuration file changes. As a rule, the new file contains directives and settings that are necessary for the new version of the program, without which it cannot work.

Setting up a services is almost always changing configuration files. The end file can be the result of lengthy configuration work and many tests. This can take hours or even days.

Therefore, if it is necessary to update the configuration, a dilemma arises:

  • do not update the config, as a result of which the new version of a package will not work normally
  • update config and erase service configuration results

It is for this reason that the system asks you every time what needs to be done if the configuration file is updated with the program update?

An example of a message in which the package manager asks what to do with the new config file:

Configuration file '/etc/squid/squid.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** squid.conf (Y/I/N/O/D/Z) [default=N] ? 

The options are:

  • Y or I – install a new config file
  • N or O – save the currently used config file
  • D – show differences between versions
  • Z – open the shell to examine the situation

The default option is to save the current config file (N).

If in reality you have not used this program, or the settings made are of no value to you, then always agree to update the configuration file. If the settings made are important to you, then:

  • refuse to update the config file
  • make a backup copy of your config, update the config file to the new version, and then make the necessary settings in it

For some packages, like Tor, the config file is just a set of comments with no setting active – for such files (if you haven't changed them), the update is more of a formality.

How to view the new config file

Typically, system administrators and users save the current configuration file. But how do you view the new file? After all, it is quite possible that there are important changes in it.

One way to do this is to download the latest version of a package and see the configuration file for the latest version in that package.

Download the package with a command like:

apt download PACKAGE

For example, to download the squid package

apt download squid

Unpack the downloaded installation file with a command like:

ar x FILE.deb

For example:

ar x squid_5.1-2_amd64.deb

Now we need to unpack a file called data.tar.gz or data.tar.xz.

Look at the contents of the folder to find out the name of the file:

ls -l

If the file has a .tar.gz extension, then the command is as follows:

tar xzf data.tar.gz

If the file has the extension .tar.xz, then the command is as follows:

tar xf data.tar.xz

Let's check the contents of the current directory again in search of unpacked folders and files:

ls -l

Configuration files on the system are usually placed in the /etc/ directory, when you unpack the package, you will find this folder under the path ./etc/ (that is, in the current folder).

For example, the command to view the configuration file of the latest version of the squid package I am interested in:

gedit ./etc/squid/squid.conf

Error “cannot resolve dependency lib32 (32-bit library)” (SOLVED)

When installing a package on Arch Linux or a distro derived from it, for example, by running the following command:

sudo pacman -S trid

an error may occur stating that dependencies could not be resolved. The name of this dependency can contain the number “32” or the string “lib32”, that is, it is a 32-bit package, for example:

resolving dependencies...
warning: cannot resolve "lib32-ncurses", a dependency of "trid"
:: The following package cannot be upgraded due to unresolvable dependencies:

:: Do you want to skip the above package for this upgrade? [y/N]

To fix this error, multilib must be enabled.

The multilib repository is the official repository that allows the user to run and build 32-bit applications on 64-bit Arch Linux.

To enable multilib, open the text file /etc/pacman.conf:

sudo gedit /etc/pacman.conf

Find and uncomment the lines in it (make sure to uncomment both lines, otherwise the changes will not take effect):

Include = /etc/pacman.d/mirrorlist

Update package information:

sudo pacman -Sy

And re-run the package installer – this time all dependencies should be resolved.