Manjaro Difference between revisions of "Pacman troubleshooting"

Difference between revisions of "Pacman troubleshooting"

From Manjaro
imported>Verityproductions
imported>Verityproductions
Line 46: Line 46:




== "Warning: Configuration file...not recognized" Error ==
== "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 the addresses contained in the mirrorlist file have not been listed properly, resulting in pacman being able to connect to them. Another tell-tale sign is that this problem will also be encountered immediately after:
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 able 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
* Installing Manjaro (i.e. having edited the mirrorlist file during the installation process), or
Line 54: Line 54:




=== Editing the Mirrorlist File ===
=== Editing the Mirrorlist ===


It will be necessary to (re)edit the mirrorlist file to correct the problem. The syntax of the command to edit the mirrorlist is:
It will therefore be necessary to (re)edit the mirrorlist file to correct the problem. The syntax of the command to edit the mirrorlist is:


  sudo [text editor] /etc/pacman.d/mirrorlist
  sudo [text editor] /etc/pacman.d/mirrorlist
Line 66: Line 66:




Otherwise - if you have installed the full version of Manjaro (i.e. not the NET-Edition) - you may find it easier to use the ''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:
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
  sudo gedit /etc/pacman.d/mirrorlist


=== Identifying and Fixing the Problem ===


Once opened, the mirrorlist file presented should look similar to this (text has been coloured for illustrative purposes):
Once opened, the mirrorlist file presented should look similar to this (text has been coloured for illustrative purposes):
Line 95: Line 97:




Lines beginning with a hash '#' will be ignored by pacman. As such, the top part of the file listing the names of countries followed by server addresses is actually there purely for your own information. Its purpose is to tell you which servers are available in what countries. The text coloured in <font color="red">red</font color> at the end of each 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 <font color="green">Server =</font color>.
'''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 <font color="red">red</font color> at the end of each internet address is there to tell you the <font color="red">download speed</font color> 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 <font color="green">Server =</font color>.
 
As such, the most common reason for not being able to connect to the Manjaro servers will be due to removing hashes from the server addresses contained table at the top of the mirrorlist, and:
 
* Not removing the text that tells you the <font color="red">download speed</font> of the server (e.g. '<font color="red">... 0.769</font color>'), and/or
* Not starting the line with <font color="green">Server =</font color>
 
Where a server address has been unhashed in the table, you must therefore ensure that the server download speed listed at the end of the line is removed - including the dots ('...') -, otherwise pacman will think that this is part of the actual internet address. In addition, you must also ensure that the line begins with 'Server =', otherwise pacman will not know what the address is for.
 
{{tip|'''A much simpler solution''' is to replace any hashes removed from the beginning of any lines in the table, and just use the servers listed for you at the bottom. The fastest servers will have been automatically chosen anyway.}}
 
 
Otherwise, if you had previously copied and pasted one or more addresses and/or typed them out manually, check to ensure that they are listed fully and correctly. A single missing or wrong character will be entirely enough to prevent pacman from connecting. Once your amendments have been completed:
 
*'''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.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.