Pacman troubleshooting
Views
Actions
Namespaces
Variants
Tools
Software Installation
Various issues relating to the download and installation of software packages from the Manjaro repositories are dealt with here.
"Unable to lock database" Error
When downloading and installing software from the repositories, a special database lock file will be created in order to ensure that the current installation process is the only one running at that time. Otherwise, attempting to install multiple files from multiple sources simultaneously may corrupt the downloaded files, cause file conflicts - or worse still - damage your system. Once the installation has been completed, the lock file will then be automatically deleted. This error may therefore occur due to two possible reasons:
- Another installation is still taking place and has not yet finished, or
- A previous installation attempt had not finished properly (e.g. due to being aborted early)
It is therefore wise to first check to ensure that another installation is not (or had not been) in process at the time of the error. When satisfied that this is not the case, then the database lock file can be manually deleted. To do so, open up the terminal and enter the following command:
sudo rm /var/lib/pacman/db.lck
Once done, you should now be able to successfully re-attempt your intended installation.
"Failed to commit transaction (invalid or corrupted package)" Error
We all have our own unique signatures which are used to authenticate who we are and to prevent fraudulent or even malicious activities by others. This is also the case with software packages available from the software repositories. They all contain encrypted codes (signature keys) unique to their developers to ensure that they are authentic and not malicious in nature.
During the installation process, once any software packages have been downloaded, your system will first check their signature keys to ensure that they are authentic prior to actually installing them. If a signature key cannot be verified for any reason, then the installation process will be aborted. This problem will usually occur due to:
- one or more signature keys contained in your system's database being revoked, changed, corrupted, or out of date
- one or more software packages not having been signed off properly when placed in a repository
Where a package has not been signed off properly before being placed in a repository, it will be the responsibility of the developer(s) to correct this. However, as this problem will be more than likely due to a problem with your system's verification of a signiture key, this can be solved in three easy steps. Once you have opened your terminal:
1. Refresh and update the signature keys by entering the command:
sudo pacman-key --refresh-keys
2. Reload the signature keys by entering the command:
sudo pacman-key --populate archlinux manjaro
3. Clear out the software packages downloaded during the aborted installation by entering the command:
sudo pacman -Scc
During this process, you will be asked to confirm that you wish to remove all files from the cache, and remove unused repositories. Enter y for 'yes' to confirm on both occasions, as it will be necessary to download the software packages again should you wish to re-attempt an installation, having refreshed and re-loaded the signature keys.
"Configuration file...not recognized" Error
Manjaro's package manager - pacman - uses a file called mirrorlist to tell it the internet addresses of the Manjaro servers in order to download updates and software applications from them. This error will therefore occur if one or more server addresses contained in the mirrorlist file have not been listed properly, resulting in pacman being unable to connect to them. Another tell-tale sign is that this problem will also be encountered immediately after:
- Installing Manjaro (i.e. having edited the mirrorlist file during the installation process), or
- Editing the mirrorlist file at a later point.
Opening the Mirrorlist
You will need to first open your terminal in order to (re)edit the mirrorlist file and correct the problem. The syntax of the command to edit the mirrorlist is:
sudo [text editor] /etc/pacman.d/mirrorlist
For example, if you wish to edit the file within the terminal using nano (a standard terminal-based text editor) then enter:
sudo nano /etc/pacman.d/mirrorlist
Otherwise - if you have installed the full version of Manjaro (i.e. not the NET-Edition) - you may find it easier to use the pre-installed gedit text editor instead. This will open the mirrorlist file up as a document, making it easier to read and edit. To use gedit instead, the command is:
sudo gedit /etc/pacman.d/mirrorlist
Understanding the Mirrorlist
Once opened, the mirrorlist file presented should look similar to this (text has been coloured for illustrative purposes):
# Server list generated by rankmirrors on 2012-10-07 ## ## Manjaro Linux repository mirrorlist ## Generated on 2012-09-11 ## ## France # http://manjarolinux.polymorf.fr/$repo/$arch ... 0.494 ## Germany # http://mirrors.mycraft.eu/manjaro/$repo/$arch ... 0.367 # http://ftp.halifax.rwth-aachen.de/manjaro/$repo/$arch ... 0.300 ## Greece # http://ftp.cc.uoc.gr/mirrors/linux/manjaro/$repo/$arch ... 0.769 ## United Kingdom # http://repo.manjaro.org.uk/$repo/$arch ... 0.518 ## United States # http://mirror.dacentec.com/manjaro/$repo/$arch ... 0.887 Server = http://ftp.halifax.rwth-aachen.de/manjaro/$repo/$arch Server = http://mirrors.mycraft.eu/manjaro/$repo/$arch Server = http://manjarolinux.polymorf.fr/$repo/$arch Server = http://repo.manjaro.org.uk/$repo/$arch
Lines beginning with a hash '#' will be ignored by pacman. As such, the top part of the file is a table that lists the names of countries followed by their server internet addresses purely for your own information. Its purpose is to tell you - not pacman - which servers are available in what countries. The text coloured in red at the end of each internet address is there to tell you the download speed of the server. It is actually the bottom part of the file where the hashes have been removed that is intended to be used by pacman to connect to the manjaro servers. Notice that each of these lines begins with the command Server =. They will be accessed in the order they are listed.
Fixing the Mirrorlist
The most common reason for not being able to connect to the Manjaro servers is therefore due to attempting to use one or more of the server addresses listed in the table, and:
- Not removing the text that tells you the download speed of the server (e.g. '... 0.769'), and/or
- Not starting the server address line with the Server = command.
Ensure that the server download speed listed at the end of any unhashed server address line is removed - including the dots ('...') -, otherwise pacman will think that it is part of the actual internet address. In addition, ensure that any unhashed server address used begins with 'Server =', otherwise pacman will not know what the address is for. Furthermore, if you had previously copied and pasted one or more server addresses, or had manually typed them in, also ensure that what's listed is both complete and correct. A single missing or incorrect character will be enough to cause an error.
Once your amendments have been completed save your changes and close the mirrorlist by:
- nano: Press CTRL and 'x' to exit, 'y' to save, and <enter> to finish, or
- gedit: Select the 'save' option and then close the window.
Synchronising with the Manjaro Servers
Once the amendments to the mirrorlist have been made, it will then be necessary to synchronise with the Manjaro servers. To do so, enter the following command into the terminal:
sudo pacman -Syy
"GPGME error: No data" Error
The most likely cause of this issue is that an error or corruption has been detected by pacman in one or more software packages being downloaded. Package signatures and checksums are used to verify the validity of downloaded software, and should they fail, the installation attempt will be aborted to protect your system until the matter is resolved.
Basic Resolution Option
To resolve this issue, first follow the basic procedure provided below. If this does not work, then there is a more comprehensive procedure available.
1. Resynchronise with the Manjaro servers to ensure that everything is up to date by entering the command:
sudo pacman -Syy
2. Clear out the software packages downloaded during the aborted installation by entering the command:
sudo pacman -Scc
3. Re-attempt the aborted download.
Comprehensive Resolution Option
If the basic proceedure still does not resolve the matter, further steps are available:
1. Refresh and update the signature keys by entering the command:
sudo pacman-key --refresh-keys
2. Reload the signature keys by entering the command:
sudo pacman-key --populate archlinux manjaro
3. Clear out the software packages downloaded during the aborted installation by entering the command:
sudo pacman -Scc
4. Re-attempt the aborted download.
If this error still occurs, then it is recommend to Change to a Different Download Server.