Tag: software errors / problem solutions

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
    cli_entry_point()
  File "/usr/lib/python3.10/site-packages/pikaur/main.py", line 272, in cli_entry_point
    run_with_sudo_loop(pikaur_operation)
  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
    InstallPackagesCLI()
  File "/usr/lib/python3.10/site-packages/pikaur/install_cli.py", line 186, in __init__
    self.main_sequence()
  File "/usr/lib/python3.10/site-packages/pikaur/install_cli.py", line 193, in main_sequence
    self.get_all_packages_info()
  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__
    self.get_all_packages_info()
  File "/usr/lib/python3.10/site-packages/pikaur/install_info_fetcher.py", line 212, in get_all_packages_info
    self.get_aur_pkgs_info(self.not_found_repo_pkgs_names)
  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__
    super().__init__(**kwargs)
  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.

“Initramfs unpacking failed: invalid magic at start of compressed archive” error (SOLVED)

This article will show you how to fix the Linux won't boot error. In this case, the solution is shown using Kali Linux as an example, but the steps are also applicable to Debian, Ubuntu, Linux Mint, and derivative distributions.

An error occurred while booting Linux:

Initramfs unpacking failed: invalid magic at start of compressed archive
Kernel panic — not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

The bottom line is that it was not possible to unpack the Initramfs due to archive corruption. Without this, the loading and operation of the operating system is impossible.

However, you can try to solve this problem without booting from a rescue disk (for example, a Live CD image).

First, try booting into Recovery Mode/Root Access on your current kernel.

To do this, select “Advanced options” in the bootloader.

Then select the item with “recovery mode” – usually the second line.

If you managed to do this, then run the following command:

sudo update-initramfs -c -k $(uname -r)

In my case, the error message changed, but the system was never booted.

If it was not possible to boot into recovery mode, then boot with a previous version of the kernel.

My system booted successfully with the previous version:

Now we need to recreate the ramdisk file. This can be done with a special command, but you need to know the kernel version number. Also, the ramdisk file is recreated each time a Linux kernel package is installed. Let's consider both options.

1. Reinstalling the Linux kernel

To reinstall the kernel, run the command:

sudo apt install linux-image-amd64

This command is suitable for 64-bit systems, if you have a 32-bit or ARM computer, then use the appropriate kernel package name linux-image-*

The previous command didn't work, and I got an error:

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

To fix the error, it is recommended to run the following command:

sudo dpkg --configure -a

It also didn't work and generated an error:

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

To fix it:

sudo rm /var/lib/dpkg/triggers/Unincorp
sudo touch /var/lib/dpkg/triggers/Unincorp

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

Then the command to fix problems with packages was successfully executed:

sudo dpkg --configure -a

During its execution, the ramdisk file was re-created (as a step in setting up one of the packages), that is, reinstalling the Linux kernel was not required. After that I rebooted Linux and the operating system booted up as usual.

2. Generate ramdisk file

To generate an initramfs (ramdisk), you need to run a command like:

sudo update-initramfs -c -k VERSION

Instead of NUMBER, you need to specify the latest version of the Linux kernel installed on your system. That is, this is the version that causes problems.

You can view the available kernels with the command:

ls -al /boot

Execution result:

итого 149988
drwxr-xr-x  4 root root     4096 ноя 27 06:02 .
drwxr-xr-x 20 root root     4096 ноя 15 03:40 ..
-rw-r--r--  1 root root   254811 окт 10 16:05 config-5.19.0-kali2-amd64
-rw-r--r--  1 root root   257010 ноя  7 16:51 config-6.0.0-kali3-amd64
drwx------  3 root root     4096 янв  1  1970 efi
drwxr-xr-x  6 root root     4096 ноя 27 06:00 grub
-rw-r--r--  1 root root 67132798 ноя  9 03:32 initrd.img-5.19.0-kali2-amd64
-rw-r--r--  1 root root 70411394 ноя 27 06:02 initrd.img-6.0.0-kali3-amd64
-rw-r--r--  1 root root       83 окт 10 16:05 System.map-5.19.0-kali2-amd64
-rw-r--r--  1 root root       83 ноя  7 16:51 System.map-6.0.0-kali3-amd64
-rw-r--r--  1 root root  7703168 окт 10 16:05 vmlinuz-5.19.0-kali2-amd64
-rw-r--r--  1 root root  7788992 ноя  7 16:51 vmlinuz-6.0.0-kali3-amd64

The kernel version is numbers followed by words. For example, on this system, the latest kernel version is “6.0.0-kali3-amd64”. Then the command to create a new initramfs file is:

sudo update-initramfs -c -k 6.0.0-kali3-amd64

After that restart your computer:

reboot

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

ImageMagick error on Windows: “magick: unable to open image ”test’: No such file or directory @ error/blob.c/OpenBlob/3565. magick: no decode delegate for this image format `’ @ error/constitute.c/ReadImage/741.” (SOLVED)

If in Windows 11 open CMD:

cmd

And then run the command:

magick '.\Для теста.jpg' test.png

An error will be received that there is no such file or directory:

magick: unable to open image ''.\╨Ф╨╗╤П': No such file or directory @ error/blob.c/OpenBlob/3565.
magick: no decode delegate for this image format `' @ error/constitute.c/ReadImage/741.

You can see that non-Latin characters are used in the file name, so you might think that this is the problem – that is, the “magick” program does not support alphabets other than English.

But if you try to rename the file and run the following command:

magick 'test file.jpg' new.png

Then the same error will be received again:

magick: unable to open image ''test': No such file or directory @ error/blob.c/OpenBlob/3565.
magick: no decode delegate for this image format `' @ error/constitute.c/ReadImage/741.

How to fix “magick: unable to open image ''test': No such file or directory @ error/blob.c/OpenBlob/3565. magick: no decode delegate for this image format `' @ error/constitute.c/ReadImage/741.”

1. Use double quotes instead of single quotes

If the filename is enclosed in double quotes instead of single quotes, then the command works correctly:

magick ".\Для теста.jpg" test.png

That is, try putting the filename in double quotes. If the problem persists, then it is related to the encoding of the file name.

2. Use PowerShell instead of CMD

In Windows 11 and Windows 10, the default command prompt is PowerShell, not CMD.

If your Windows uses CMD by default, then either set it to use PowerShell in the settings, or run one of the following commands at the command prompt:

powershell
pwsh

In Windows 11 + Windows Terminal Preview + PowerShell 7 command

magick '.\Для теста.jpg' test.png

works without errors.

See also: ImageMagick guide: installing, using, and troubleshooting

Some program areas become transparent or invisible in guest OS Windows after upgrading to VirtualBox 7 (SOLVED)

The big update to VirtualBox 7 brought a lot of changes and, apparently, bugs. Some of them have already been covered in the post “Windows stopped booting in Virtual Machine after upgrading to VirtualBox 7 (SOLVED)”.

While working with a guest OS Windows 11 in VirtualBox 7, new issues were discovered, some of which were resolved, and some are still not resolved. In this note, we will look at how to fix the problem with invisible areas of programs.

This error does not occur in all programs, so I did not immediately pay attention to it. For example, the MS Word office editor window looks like this in the guest OS:

This is what the opened document looks like:

You may notice that the background of the context menu is transparent, although it shouldn't be.

Another unexpected transparency.

Search results are not visible in the “Settings” app due to inappropriate transparency.

It's an open Notepad with text in it.

The menu for closing a document looks like this.

How to fix transparency in Windows guest in VirtualBox 7

The problem was solved in the following way:

1. Shut down the guest OS

2. Go to its settings → Display.

Uncheck “Enable 3D Acceleration”.

3. Boot guest OS with Windows as usual

Now MS Word and the context menu look normal:

Notepad is working now.

Warning about unsaved changes looks correct now.

In the “Settings” app, search results are now on an opaque background so they're easier to read.

Error “The ‘<‘ operator is reserved for future use.” (SOLVED)

Analog “<” for PowerShell

On Linux, you can use the following construct:

COMMAND1 < FILE1

In this case, COMMAND1 will be executed with FILE1 as the input source instead of the keyboard, which is the normal standard input source.

The “<” operator corresponds to the use of “|” to be passed to standard input. For example, the following commands are identical:

COMMAND1 < FILE1
cat FILE1 | COMMAND1

Trying to use this construct in PowerShell throws an error.

For example command

mysql -uroot < C:\Users\MiAl\Downloads\all-databases.sql

ends with the following message:

ParserError:
Line |
   1 |  mysql -uroot < C:\Users\MiAl\Downloads\all-databases.sql
     |               ~
     | The '<' operator is reserved for future use.

Similar error in PowerShell 5:

string:1 character:14
+ mysql -uroot < C:\Users\MiAl\Downloads\all-databases.sql
+              ~
The '<' operator is reserved for future use.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : RedirectionNotSupported

Instead of syntax

COMMAND1 < FILE1

you need to use the following structure:

Get-Content FILE1 | COMMAND1

The Get-Content cmdlet will read the contents of FILE1. Symbol “|” (pipe, conveyor) means to pass the content to COMMAND1.

Thus, instead of

mysql -uroot < C:\Users\MiAl\Downloads\all-databases.sql

you need to use the following command:

Get-Content C:\Users\MiAl\Downloads\all-databases.sql | .\mysql -uroot

“./program < input.txt > output.txt” alternative for PowerShell

Consider the construction

./program < input.txt > output.txt

It means that the contents of the input.txt file are passed to the standard input of the “program” command, and the result of program execution is redirected to the output.txt file. But the above command will not work.

An analogue of the considered construction, which will work in PowerShell, is the following command:

Get-Content INPUT.txt | ./program > output.txt

Or you can use the PowerShell style variant:

Get-Content INPUT.txt | ./program | Out-File output.txt

mysqldump in PowerShell corrupts non-Latin characters when exporting database (SOLVED)

mysqldump is a MySQL utility for creating database and table backups. Unlike phpMyAdmin, which, although it offers a web interface, is a slower tool due to the limitations of intermediates such as PHP and Apache, mysqldump is a much more efficient tool without limitations for backing up very large data.

But on Windows, mysqldump has some nuances. Due to the peculiarities of PowerShell for working with encodings, all non-Latin characters can be corrupted in exported databases. This issue is not seen in CMD, but recent versions of Windows use PowerShell by default, so the issue in question affects all users who run mysqldump to back up databases in Windows.

The following command, executed in PowerShell 7:

.\mysqldump.exe -u root --all-databases > all-databases_ps7.sql

Creates a UTF-8 encoded all-databases_ps7.sql file into which all MySQL databases will be exported using mysqldump (for backup purposes). But in these databases all non-Latin characters will be irretrievably corrupted!

That is, instead of Cyrillic, it will be something like this:

'╨Р╤А╨▒╨╕╤В╤А╨░╨╢╨╜╤Л╨╣ ╨┐╤А╨╛╤Ж╨╡╤Б╤Б: ╤Г╤З╨╡╨▒╨╜╨╕╨║ / ╨Ъ.╨Ь. ╨Р╤А╤Б╨╗╨░╨╜╨╛╨▓, ╨Ф.╨е. ╨Т╨░╨╗╨╡╨╡╨▓, ╨а.╨Э. ╨У╨╕╨╝╨░╨╖╨

To avoid this problem, use mysqldump with the --result-file option. The following command will save the database in the correct encoding:

.\mysqldump.exe -u root --all-databases --result-file=all-databases.sql

You can also use the following two-command construct to fix the encoding problem:

[Console]::OutputEncoding = [System.Text.Encoding]::GetEncoding("UTF-8")
.\mysqldump.exe -u root --all-databases > all-databases.sql

Output encoding issues in PowerShell and third-party utilities running in PowerShell (SOLVED)

What encoding is used in PowerShell by default. How to change the default output encoding to UTF-8 in PowerShell

If you run the following command in PowerShell 5:

"Testing" > test.file

And check the encoding in the newly created test.file, it turns out that it is UTF-16LE.

If you run the following command in PowerShell 7:

"Testing" > test.file

And check the encoding in the newly created test.file, it turns out that it is UTF-8.

The following command, executed in PowerShell 5:

.\mysqldump.exe -u root --all-databases > all-databases_ps5.sql

Creates a UTF-16LE encoded all-databases_ps5.sql file into which all MySQL databases will be exported using mysqldump (for backup purposes). In these databases, ALL non-Latin characters will be irretrievably corrupted!

That is, instead of Cyrillic, it will be something like this:

'╨Р╤А╨▒╨╕╤В╤А╨░╨╢╨╜╤Л╨╣ ╨┐╤А╨╛╤Ж╨╡╤Б╤Б: ╤Г╤З╨╡╨▒╨╜╨╕╨║ / ╨Ъ.╨Ь. ╨Р╤А╤Б╨╗╨░╨╜╨╛╨▓, ╨Ф.╨е. ╨Т╨░╨╗╨╡╨╡╨▓, ╨а.╨Э. ╨У╨╕╨╝╨░╨╖╨

The following command, executed in PowerShell 7:

.\mysqldump.exe -u root --all-databases > all-databases_ps7.sql

Creates a UTF-8 encoded all-databases_ps7.sql file into which all MySQL databases will be exported using mysqldump (for backup purposes). But in these databases, ALL non-Latin characters will be irretrievably corrupted AGAIN!

That is, it would seem that the default encoding has changed to UTF-8, but the problem with completely corrupted database backups has not gone away.

How to save output from third-party programs in UTF-8 encoding in PowerShell

The above behavior, which corrupts the output of commands in PowerShell, is not acceptable. Let's look at how to ensure that output in PowerShell is saved in UTF-8 encoding.

How to save PowerShell output in UTF-8 encoding, use the Out-File cmdlet

Consider the following command:

.\mysqldump.exe -u root --all-databases > all-databases.sql

As already shown above, it corrupts non-Latin characters due to incorrect encoding.

In some sources, as a solution to the problem, it is recommended to replace the “>” character with “Out-File”, and also specify the encoding using the “-Encoding UTF8” option. That is, use the following command:

.\mysqldump.exe -u root --all-databases | Out-File -Encoding UTF8 all-databases_fixed.sql

In fact, both in PowerShell 7 and in PowerShell 5, this command changes little. First, the command is analogous to the output redirection symbol “>”. Secondly, by default, the Out-File cmdlet uses UTF-8 encoding, that is, it is not necessary to specify it specifically.

But the most important thing is that despite the fact that the data is saved to a file with UTF-8 encoding (in the previous command, this is the all-databases_fixed.sql file), non-Latin characters in this file are still corrupted! The thing is that the Out-File cmdlet initially processes the received data in the wrong encoding. Therefore, it no longer matters how exactly Out-File saves the data – the data is corrupted already at the time of receipt in this cmdlet.

The problem was solved by explicitly specifying the encoding for the received data:

[Console]::OutputEncoding = [System.Text.Encoding]::GetEncoding("UTF-8")

The subsequent run of the command saved all the data in the correct encoding:

.\mysqldump.exe -u root --all-databases | Out-File -Encoding UTF8 all-databases_fixed.sql

This method works equally well in PowerShell 7 and PowerShell 5.

By the way, the original command using this method also saves the data in the correct encoding:

[Console]::OutputEncoding = [System.Text.Encoding]::GetEncoding("UTF-8")
.\mysqldump.exe -u root --all-databases > all-databases.sql

Saving output by third-party utilities

In all previous commands, we redirected the output of the mysqldump utility to a file, or to the Out-File cmdlet. But the mysqldump utility has a --result-file option after which you can specify a filename to output. That is, as a result of using this option, you do not need to use output redirection or PowerShell cmdlets.

The following command will save the database in the correct encoding:

.\mysqldump.exe -u root --all-databases --result-file=all-databases.sql

Windows stopped booting in Virtual Machine after upgrading to VirtualBox 7 (SOLVED)

After upgrading to VirtualBox 7 (more precisely, to VirtualBox 7.0.2), the Windows 11 guest OS stopped booting.

Windows 11 guest boot starts as usual, no errors are displayed. Moreover, you can hear the Windows logon sound, but the desktop is not shown.

Boot freezes on the initial screen with UEFI messages.

As a host (main) OS, I use Linux, namely Arch Linux.

The problem was solved in the following way:

1. Shut down the guest OS

2. Go to its settings → Display.

Uncheck “Enable 3D Acceleration”.

3. Boot guest OS with Windows as usual

4. Update Guest Additions.

5. After that, you can again activate the “Enable 3D Acceleration” setting – the guest system will boot without errors.

Hangups while updating Guest Additions

One of the innovations of VirtualBox 7 is the automatic updating of the Guest Addition.

But in my case, after inserting Guest Additions CD image, an error occurred and the virtual computer hung.

In addition to the problem discussed just above, I noticed that the Windows guest OS, after inserting the “Guest Additions CD image”, tried to update them on its own. This led to endless freezes and the need to force a reboot of the guest OS.

Finally, the problem was solved in the following way:

1. Remove Guest Additions (if your guest OS keeps freezing then boot into safe mode)

2. Restart your computer

3. Reinstall the Guest Additions

4. Restart the computer again

Should I upgrade to VirtualBox 7?

At the time of writing, the latest stable version is VirtualBox 7.0.2, which was released just a few days after the release of the first stable version of VirtualBox 7.

However, according to my observations, Windows 11 is still unstable in VirtualBox 7.0.2.

Although VirtualBox 7 brings significant updates, they are not in demand by most users who run virtual machines in VirtualBox. If you do not see anything important in the changelog in VirtualBox 7, then I would recommend waiting a few months before upgrading. During this time, more problems and bugs will be fixed.

See also: Some program areas become transparent or invisible in guest OS Windows after upgrading to VirtualBox 7 (SOLVED)

Loading...
X