Tag: BlackArch / Arch Linux

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.

phpMyAdmin error “Error: Undefined constant “SODIUM_CRYPTO_SECRETBOX_KEYBYTES”” (SOLVED)

On Arch Linux, when trying to use the phpMyAdmin 5.3 pre-release, I encountered an error:


Checking in Debian showed that there is no such problem with phpMyAdmin 5.3.

The reason for the error is that sodium support is not enabled.

How to enable sodium on Arch Linux (Manjaro, BlackArch)

To enable sodium support in Arch Linux and derivative distributions (Manjaro, BlackArch) follow these steps.

Install the php-sodium package:

sudo pacman -S php-sodium

Open the /etc/php/php.ini file:

sudo gedit /etc/php/php.ini

Find the line in it


and uncomment it to get:


Restart the web server for the changes to take effect:

sudo systemctl restart httpd.service

This will enable sodium support and the error in phpMyAdmin 5.3 will disappear.

Swap file and swap partition in Arch Linux (BlackArch): what to choose and how to add Swap

RAM, along with the central processor, is a determining factor in the performance of a computer. Moreover, the speed (frequency) of RAM is not so important, how important is its quantity – the amount of RAM.

The computer starts to work much slower if it does not have enough RAM. Moreover, if it has a swap partition, then it can copy some information from RAM to it and then read it – this reduces performance, but at least does not lead to a reset of running tasks and a computer freeze.

So, if the performance of your computer drops due to a lack of RAM, then I would recommend upgrading the hardware first, that is, buying more RAM sticks. But this is not always possible. Or, in addition to buying hardware RAM, you can add another swap partition.

What is Swap

Swap is a place in permanent storage (hard disk, SSD, USB storage) to which part of the RAM is temporarily dumped, which:

a) not currently used in calculations

b) does not fit in physical RAM.

What is the difference between swap partition and swap file

So, we have decided that the swap partition and swap file in Linux is called Swap.

Now let's look at the two available options: partition and swap file.

Swap partition

A swap partition is a dedicated disk space, a separate volume that is created when partitioning a disk during installation of an operating system.

If you want to create a swap partition after installing the operating system, for example, as follows: reduce the volume of one of the partitions, and create a Swap partition on the freed space, then most likely you will not be able to do this “hot”, that is, during operation this same operating system. You will have to boot from a USB stick or optical disc and perform the necessary operations from it.

Swap file

A swap file performs the same functions as a partition, but is more convenient to use.

The convenience of using the swap file is expressed as follows:

a) the swap file is created as a regular file, that is, there is no need to partition the disk

b) to connect the swap file, you do not need to restart the operating system

c) to change the size of the swap file, you do not need to restart the operating system

d) to disable and delete the swap file, you do not need to restart the computer

That is, the situation is quite real when you need a swap file for a short time – for example, for an hour. You can create it, connect it, perform a task that requires a significant amount of RAM, and disable and delete it after. This is especially true if you have, for example, a fast, but not large SSD drive – and you don't want to constantly keep the swap file, especially if it is not particularly needed most of the time.

Another option with a paging file is convenient on VPS hosting, when unnecessary server downtime due to maintenance is not needed, and the impossibility of physical access requires contacting the support service.

How to display information about the swap file in Linux

To check if the swap file is present, what size it is and how much it is being used, run the command:

swapon --show

Either the command:

free -h

How to create a swap file in Arch Linux

All subsequent commands must be run with root user privileges.

To create a sSwap file, run the fallocate command, along with which you need to specify the size of the swap file to be created. You can use abbreviations (M = megabytes, G = gigabytes). For example, to create a 16 GB swap file located at the /swapfile path, you need to run the command:

sudo fallocate -l 16G /swapfile

The fallocate command can cause problems with some file systems such as F2FS or XFS. A more reliable, though slower, alternative is to use the dd command (this example will create a 512 megabyte file):

dd if=/dev/zero of=/swapfile bs=1M count=512 status=progress

Set file permissions (readable swap is a huge local vulnerability):

sudo chmod 600 /swapfile

Format the file in swap:

sudo mkswap /swapfile

Activate the swap file:

sudo swapon /swapfile

Please note that already at this stage the swap file starts to be used – no system reboot is required!

To ensure that the swap file is used after each reboot, open the /etc/fstab file.


sudo gedit /etc/fstab

In the command line interface:

sudo vim /etc/fstab

And add this line to this file:

/swapfile none swap defaults 0 0

Note: The swap file must be specified by its location in the file system, not by its UUID or LABEL.

Removing the Swap file

To remove the swap file, you must first disable it, and then it can be deleted:

sudo swapoff -a
sudo rm -f /swapfile

Finally remove the relevant line from /etc/fstab.

How to check Swap File usage in Linux

Stress testing the system in a out of RAM Scenario: How to check Swap file usage in Linux

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

How to update the systemd-boot loader in /boot

Update /boot

During the installation of Arch Linux on modern computers with UEFI (BIOS replacement), we create a small partition on the disk with a mount point in /boot into which we install the boot loader using bootctl. This bootloader is systemd-boot, which is part of systemd. Over time, systemd can be updated like any other Arch Linux package. This does not automatically update the loader in /boot. For this reason, if you have been using the same Arch Linux installation for a long time, then your boot loader in /boot may be out of date.

This article will show you how to view version and supported features, and how to update systemd-boot in /boot on Arch Linux (as well as BlackArch and Manjaro).

What is systemd-boot

systemd-boot (short for sd-boot) is a simple UEFI boot manager. It provides a graphical menu for selecting an entry to boot and a kernel command line editor. Systemd-boot only supports systems with UEFI firmware.

systemd-boot loads boot record information from the EFI system partition (ESP), usually mounted in /efi/, /boot/, or /boot/efi/ during OS startup, and from an extended bootloader partition if it exists (usually mounted in /boot/). Fragments of the configuration file, kernels, initrds, and other EFI images to boot should usually reside on an ESP or extended boot loader partition. Linux kernels must be built with CONFIG_EFI_STUB so that they can be directly run as an EFI image. At boot time, systemd-boot automatically collects a list of boot records from the following sources:

  • Boot entries defined using the loader specification descriptor files located in /loader/entries/ on ESP and in the advanced loader section. They usually describe Linux kernel images with associated initrd images, but can also describe arbitrary other EFI binaries.
  • Unified kernel images as per bootloader specification as EFI executable binaries in /EFI/Linux/ on ESP and in the extended bootloader section.
  • Microsoft Windows EFI Boot Manager, if installed.
  • Apple MacOS X Boot Manager, if installed.
  • EFI Shell binary, if installed
  • Reboot to the option UEFI Firmware Configuration, if supported.

systemd-boot supports the following features:

  • Major changes to the boot manager configuration (such as setting a timeout, choosing a default boot record, etc.) can be made directly from the boot loader UI at boot time as well as at run time with EFI variables.
  • The boot manager integrates with the systemctl command to implement features such as systemctl reboot --boot-loader-entry=… (to reboot to a specific boot menu item, eg “reboot to Windows”) and systemctl reboot --boot-loader-menu=… (to reboot in the bootloader menu) by implementing the bootloader interface.
  • The EFI variable, set by the bootloader, tells the OS about the ESP used at boot time. It is then used to automatically mount the correct ESP partition in /efi/ or /boot/ while the OS is running.
  • The Boot Manager provides information about the boot time taken by the UEFI firmware using the Boot Loader Interface. This information can be displayed using systemd-analyze
  • Boot Manager implements load counting and automatic rollback to older workload records in case of failure.
  • The boot manager additionally reads a random seed from the ESP, concatenates it with the “system token” stored in the constant EFI variable, and extracts a random seed for the OS to use as an initialization of the entropy pool, providing a full pool of entropy during early boot.

How to update the bootloader in /boot

The bootctl program can check EFI firmware and bootloader status, list and manage available bootloaders and bootloader entries, and install, update, or remove systemd-boot on the current system.

To check if your system uses systemd-boot, run the command:

bootctl is-installed

To check the current version of the bootloader and see other information about it, run the following command:


You will see something like the following:

Pay attention to the Product line - it contains the version, in the screenshot it is 249.5-3.

Also look at the Features list - if you installed your system a long time ago, then some features may be disabled - an update will fix this.

For example, the Features list in the screenshot:

               ✓ Boot counting
               ✓ Menu timeout control
               ✓ One-shot menu timeout control
               ✓ Default entry control
               ✓ One-shot entry control
               ✓ Support for XBOOTLDR partition
               ✓ Support for passing random seed to OS
               ✗ Load drop-in drivers
               ✓ Boot loader sets ESP information

Most of the list is marked with green checkmarks (), but one item (in your case, these may be other items) is marked with a red cross (). This means that systemd supports all of the listed functions, including those marked with a cross, but the currently installed bootloader does not support what is marked with a cross. In order for the bootloader to start supporting the entire list, it needs to be updated.

Using the command

pacman -Ss systemd

you can see the current version of the systemd package. In the screenshot, it is 250-1. That is, you can upgrade to a newer version.

To check the current version of systemd, you may prefer the following command:

pacman -Si systemd

Updating the systemd-boot loader in /boot is performed with the following command:

sudo bootctl update

You need to restart your computer for the changes to take effect.

Chromium will no longer sync passwords - what should Linux users do?

Chrome and Chromium on Linux

Everyone knows the Google Chrome web browser. Chromium is at its core. That is, Chromium is the open source web browser that Google builds on the Chrome web browser, adding proprietary (i.e. closed) code to it.

The Chrome browser is distributed by Google itself as compiled files. The Chromium browser is available as open source. For this reason, Chrome is popular among Windows users - most Windows users install binaries compiled by the authors on their system and do not see anything strange in this.

It's a little different on Linux. Linux users also download and install compiled packages, but compilation is done by the distribution maintainers using the source code of the programs. This is in line with the spirit of Linux and its licenses. Closed source packages are placed in separate repositories (package sources for installation).

For this reason, it is Chromium that is prevalent among Linux users, and Chrome is often absent from the repositories. But until recently, browsers were almost identical, so you could use Chromium just like Chrome.

The Chrome/Chromium web browser makes extensive use of Google's APIs. These APIs include, for example, password and bookmark synchronization. But Google announced that from March 2021, some APIs will be available only in the Chrome web browser, but will be disabled in Chromium, as well as in all third-party browsers that use Chromium as their basis. Disabled APIs include password synchronization.

I don't mind third-party web browsers - just imagine that if you log into your Google account on a third-party browser, thanks to the password synchronization function, it gets access to all (!) your passwords on all (!) websites. Many untrustworthy Chromium-based web browsers have sprung up about the creators of which cannot be found and whose source code is not published (sometimes despite their assurances).

But what's really annoying is that important functions will no longer work in Chromium too. From a full-fledged alternative to Chrome, Chromium has now become a web browser with limited functions.

If you don't use password sync, then you have nothing to worry about

Despite the anger of the maintainers of some distributions and threats to stop supporting or even kick the web browser out of the repositories, apparently no one will do it. Therefore, if you do not need the function of synchronizing passwords and bookmarks, then you can safely continue using Chromium on Linux.

But what about Linux users who use Chromium and need password sync and other features? Let's consider several options.

1. Stop using the password sync feature in web browsers

Yes, the fact that all your passwords are stored by strangers is bad, to put it mildly. But it's super convenient if you have more than one device (computer, phone, tablet, second computer, more virtual computers…). But if you think about it, it's like giving the keys to your apartment to an outsider, so that when you appear, he opens and closes the door to your apartment, and you don't have to climb into your pockets for keys. Conveniently. But you have no idea what happens to your keys while you are away.

Therefore, one option is to continue using Chromium, but stop using the password sync feature.

2. Switch to Firefox

Firefox is open source and also has a password sync feature. If you want to show Google that you are not satisfied with this change, you can switch to Firefox. Just in case - if your passwords are synchronized using Firefox, then it is no better or worse than if they are stored by Google.

3. Install Chrome on Linux

In fact, installing Chrome from Google itself on Linux is trivial. So you can go the same route that most Windows users do - just install a web browser with proprietary code.

In Debian, Linux Mint, Ubuntu, Kali Linux and their derivatives, to install Google Chrome, just run the commands:

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i ./google-chrome-stable_current_amd64.deb
sudo apt install -f

That's all! At the same time, during the installation of the web browser, the Google repository will be added to the list of repositories and Chrome will be updated along with the rest of the packages in the system.

In Arch Linux, Manjaro, BlackArch and their derivatives, to install Google Chrome, just run the command:

pikaur -S google-chrome

If you have not yet installed pikaur, then install it according to the instructions “Automatic installation and update of AUR packages”.

To update a web browser package, you will need to run a system update using pikaur - this command is to update both packages from the system repositories and from the AUR:

pikaur -Syu

4. Extensions for synchronization with encryption (Bitwarden)

You can install an extension like Bitwarden and continue using Chromium.

Bitwarden uses end-to-end encryption, meaning passwords are synchronized encrypted. Moreover, the source code is open even for the server, that is, you can synchronize without any third-party participants at all.

Bitwarden works with almost any device and browser you can think of: Windows, Mac, Linux; iOS and Android; Chrome, Firefox, Safari, Edge and many other niche browsers. This gives you freedom of movement, unlike browser password managers.


Which option did you choose or, perhaps, made some other decision?

pacman error “warning: failed to retrieve some files” (SOLVED)

This article focuses on errors that occur due to problems with the mirror list.

pacman error “The requested URL returned error: 404”

There is a cache for the package manager to work - this cache contains information about existing packages for installation, their versions and download links. To update (or download for the first time) this cache, you need to run the command:

sudo pacman -Sy

Then you can perform a system update or package update.

If the cache is out of date and you are trying to install a package whose version has been updated and for which there is an old link in your local cache, you may receive an error similar to the following:

error: failed retrieving file 'goaccess-1.4.5-1-x86_64.pkg.tar.zst' from mirrors.evowise.com : The requested URL returned error: 404

To fix it, you need to run the above command, and then repeat the installation.

But a similar problem can occur when starting a system update - this is strange, since the following command starts with updating the cache, therefore, the cache is the newest and the “file not found” error should not occur:

sudo pacman -Syu

This command resulted in an error:

error: failed retrieving file 'goaccess-1.4.5-1-x86_64.pkg.tar.zst' from mirrors.evowise.com : The requested URL returned error: 404
error: failed retrieving file 'goaccess-1.4.5-1-x86_64.pkg.tar.zst' from mirror.rackspace.com : The requested URL returned error: 404
error: failed retrieving file 'goaccess-1.4.5-1-x86_64.pkg.tar.zst' from mirror.rackspace.com : The requested URL returned error: 404
error: failed retrieving file 'goaccess-1.4.5-1-x86_64.pkg.tar.zst' from mirror.dkm.cz : The requested URL returned error: 404
error: failed retrieving file 'goaccess-1.4.5-1-x86_64.pkg.tar.zst' from mirror.dkm.cz : The requested URL returned error: 404
error: failed retrieving file 'goaccess-1.4.5-1-x86_64.pkg.tar.zst' from europe.mirror.pkgbuild.com : The requested URL returned error: 404
warning: failed to retrieve some files
error: failed to commit transaction (failed to retrieve some files)
Errors occurred, no packages were upgraded.

Repeating the command many times does not change anything.

The reason is this: pacman is downloading the cache from a bad mirror that contains incorrect information. To fix it, you need to select another mirror, or move another mirror to the top of the list if you are using multiple mirrors.

Let's start by switching to a new list of mirrors. The fact is that when installing the pacman-mirrorlist package (this package contains a list of mirrors), the new /etc/pacman.d/mirrorlist file does not replace the existing one, but is saved under the name /etc/pacman.d/mirrorlist.pacnew. That is, even if you have the latest version of the pacman-mirrorlist package, this does not mean that you have an up-to-date version of the /etc/pacman.d/mirrorlist file. Check if the /etc/pacman.d/mirrorlist.pacnew file exists:

ls -l /etc/pacman.d/mirrorlist.pacnew

If the file exists, then run the following two commands (otherwise, skip them):

sudo mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.back
sudo mv /etc/pacman.d/mirrorlist.pacnew /etc/pacman.d/mirrorlist

This is not all - the point is that in the /etc/pacman.d/mirrorlist file, by default, all mirrors are commented out, that is, disabled. To fix this, open this file:

sudo gedit /etc/pacman.d/mirrorlist

and uncomment, that is, remove the # character at the beginning of the line. Choose those mirrors and countries that are closer to you.

In my case, the problematic mirror that caused the error described above was the following (do not use it):

#Server = http://mirrors.evowise.com/archlinux/$repo/os/$arch

Arch Linux has stopped updating

If you run the command “sudo pacman -Syu” every day, you may have noticed that on rare days there are no updates. If your system suddenly stopped receiving updates for several days, this may mean that the package cache is being downloaded from a low-quality mirror.

To fix - follow exactly the same steps as described for the previous error. That is, you need to switch to another mirror.

error: failed to update core (no servers configured for repository)

Another possible error after you have done any work with the list of installation package mirrors:

:: Synchronizing package databases...
error: failed to update core (no servers configured for repository)
error: failed to update extra (no servers configured for repository)
error: failed to update community (no servers configured for repository)
error: failed to update multilib (no servers configured for repository)
error: failed to synchronize all databases

The reason for this is that all lines in the /etc/pacman.d/mirrorlist file are commented out. Open this file:

sudo gedit /etc/pacman.d/mirrorlist

and uncomment, that is, remove the # symbol at the beginning of the line for those mirrors and countries that are closer to you.

Error “Cannot load modules/libphp7.so” (SOLVED)

Some Linux distributions have already started migrating to PHP 8. In some distributions the new version of PHP removes the old one, as a result of which the web server may stop working due to the fact that the files specified in the web server configuration are missing or renamed.

Examples of errors you may encounter:

httpd: Syntax error on line 504 of /etc/httpd/conf/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/mods-enabled/php.conf: Cannot load modules/libphp7.so into server: /etc/httpd/modules/libphp7.so: cannot open shared object file: No such file or directory

It says the file /etc/httpd/modules/libphp7.so was not found.

Another error that says the /etc/httpd/conf/extra/php7_module.conf file was not found:

httpd: Syntax error on line 504 of /etc/httpd/conf/httpd.conf: Syntax error on line 2 of /etc/httpd/conf/mods-enabled/php.conf: Could not open configuration file /etc/httpd/conf/extra/php7_module.conf: No such file or directory

On some distributions, the Apache web server service is called apache2, and on some httpd. Therefore, this guide will consider both options.

Fix “Cannot load modules/libphp7.so” when webserver service is named httpd (Arch Linux, CentOS and their derivatives)

To view the status of the service and the errors that led to its inoperability, run the command:

systemctl status httpd.service

Open the config file /etc/httpd/conf/mods-enabled/php.conf:

sudo vim /etc/httpd/conf/mods-enabled/php.conf

Find the line in it

LoadModule php7_module modules/libphp7.so

and replace it with:

LoadModule php_module modules/libphp.so

Then find the line

Include conf/extra/php7_module.conf

and replace with:

Include conf/extra/php_module.conf

Restart the web server service:

sudo systemctl restart httpd.service

and check its status:

systemctl status httpd.service

Fix “Cannot load modules/libphp7.so” when webserver service is named apache2 (Debian, Ubuntu, Linux Mint, Kali Linux and their derivatives)

To view the status of the service and the errors that led to its inoperability, run the command:

systemctl status apache2.service

Disable PHP 7.* module:

a2dismod php7.4

Maybe you have a different version of PHP, start typing “a2dismod php” and use the TAB key for autocompletion:

To enable PHP 8 use a command like (use the TAB key for auto-completion):

a2enmod php8

Restart the web server service:

sudo systemctl restart apache2.service

and check its status:

systemctl status apache2.service

How to choose the default Java version in Arch Linux

Several versions of the JDK and OpenJDK are available in the standard Arch Linux repositories (and derivative distributions). You can install one or more of them. Even if you have the latest version installed, some programs may install a different version of the JDK as their dependency - multiple versions are allowed, they do not cause conflicts.

After that, you can see which of these versions is used by default, and also change it using the archlinux-java program.


archlinux-java <COMMAND>

As a COMMAND it can be:

	status		List installed Java environments and enabled one
	get		Return the short name of the Java environment set as default
	set <JAVA_ENV>	Force <JAVA_ENV> as default
	unset		Unset current default Java environment
	fix		Fix an invalid/broken default Java environment configuration

Start by viewing the status:

archlinux-java status

As you can see, I have two Java environments available

  • java-11-openjdk
  • java-14-openjdk

And no Java environment is selected as the default.

I set java-14-openjdk as my default environment:

sudo archlinux-java set java-14-openjdk

I check again:

archlinux-java status

As you can see, java-14-openjdk is now used - the word (default) indicates this.

Errors: command java, javac or javap not found

When trying to start one of the following programs, you may encounter errors:

bash: java: command not found
# OR
bash: /usr/bin/java: No such file or directory

bash: javac: command not found
# OR
bash: /usr/bin/javac: No such file or directory

bash: javap: command not found
# OR
bash: /usr/bin/javap: No such file or directory

If you have already installed the JDK, then you need to select the version that will be used by default. This can be done using archlinux-java as shown above. After that, the error will disappear.