Skip to content

Unable to Update Packages on Manjaro Linux

Hello to all the readers!

Today I was trying to update the packages using Manjaro’s package manager and encountered the following error.

no servers configured for repository
Failed to synchronize databases

I tried to sync and refresh the package repository from command line as well.

sudo pacman -Sy                                                                                                                                                                     

:: Synchronizing package databases...
error: failed to synchronize all databases (no servers configured for repository)

This hints that the mirror repository is not available and that’s why it fails. I tried to pull mirror for India and that fails.

sudo pacman-mirrors -c IN                                                                                                                                                          

::INFO Downloading mirrors from Manjaro
::INFO => Mirror pool: https://repo.manjaro.org/mirrors.json
::INFO => Mirror status: https://repo.manjaro.org/status.json
::INFO User generated mirror list
::------------------------------------------------------------
::INFO Custom mirror file saved: /var/lib/pacman-mirrors/custom-mirrors.json
::INFO Using custom mirror file
::INFO Querying mirrors - This may take some time
  ..... India          : https://mirrors.vishnetwork.in/manjaro/

::ERROR Connection: HTTPSConnectionPool(host='mirrors.vishnetwork.in', port=443): Max retries exceeded with url: /manjaro/stable/core/x86_64/core.db.tar.gz (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fc4d9a93010>: Failed to establish a new connection: [Errno -2] Name or service not known'))

::INFO Writing mirror list
::INFO Mirror list generated and saved to: /etc/pacman.d/mirrorlist
::INFO To reset custom mirrorlist 'sudo pacman-mirrors -id'
::INFO To remove custom config run  'sudo pacman-mirrors -c all'

We can see that the mirror is not available. Hostname is not resolving.

Therefore I added Singapore’s mirror and that works perfectly well.

sudo pacman-mirrors -c Singapore                                                                                                                                                     

::INFO Downloading mirrors from Manjaro
::INFO => Mirror pool: https://repo.manjaro.org/mirrors.json
::INFO => Mirror status: https://repo.manjaro.org/status.json
::INFO User generated mirror list
::------------------------------------------------------------
::INFO Custom mirror file saved: /var/lib/pacman-mirrors/custom-mirrors.json
::INFO Using custom mirror file
::INFO Querying mirrors - This may take some time
  2.367 Singapore      : https://mirror.freedif.org/Manjaro/
  1.134 Singapore      : http://ossmirror.mycloud.services/os/linux/manjaro/
::INFO Writing mirror list
::Singapore       : http://ossmirror.mycloud.services/os/linux/manjaro/stable/$repo/$arch
::Singapore       : https://mirror.freedif.org/Manjaro/stable/$repo/$arch
::INFO Mirror list generated and saved to: /etc/pacman.d/mirrorlist
::INFO To reset custom mirrorlist 'sudo pacman-mirrors -id'
::INFO To remove custom config run  'sudo pacman-mirrors -c all'
sudo pacman -Sy       
                                                                                                                                                        
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date

And finally I could successfully update the packages.