[SOLVED]Problem installing anything with pacman

Posted by m3fisto 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
[SOLVED]Problem installing anything with pacman
July 02, 2017 05:05PM
On a fresh install of PB on a Pi1B, it seems that pacman is broken and cannot downoad anything.

sudo pacman -Syu
:: Synchronizing package databases...
error: failed retrieving file 'core.db' from mirrors.kernel.org : Could not resolve host: mirrors.kernel.org
error: failed to update core (download library error)
error: failed retrieving file 'extra.db' from mirrors.kernel.org : Could not resolve host: mirrors.kernel.org
error: failed to update extra (download library error)
error: failed retrieving file 'community.db' from mirrors.kernel.org : Could not resolve host: mirrors.kernel.org
error: failed to update community (download library error)
error: failed retrieving file 'alarm.db' from mirrors.kernel.org : Could not resolve host: mirrors.kernel.org
error: failed to update alarm (download library error)
error: failed retrieving file 'aur.db' from mirrors.kernel.org : Could not resolve host: mirrors.kernel.org
error: failed to update aur (download library error)
error: failed to synchronize any databases
error: failed to init transaction (download library error)



Edited 1 time(s). Last edit at 07/03/2017 06:57AM by m3fisto.
Re: Problem installing anything with pacman
July 02, 2017 05:30PM
Hi,
just run:

sudo rm /etc/resolv.conf
sudo sh -c 'echo "nameserver 8.8.8.8" > /etc/resolv.conf '

also check if internet connection is working with

ping -c3 8.8.8.8

best regards
Matthias
Re: Problem installing anything with pacman
July 02, 2017 09:24PM
Thank you very much. It worked!
Re: Problem installing anything with pacman
July 03, 2017 04:08AM
I'm glad it worked!

I already applied a patch, which should fix that issue on the next RPi-image generation.

best regards Matthias
Hi Matthias,
I am brand new to all of this. I had this same problem and I was relieved to find a solution. When I tried to run the last command you gave me though, it just gave me an open prompt that looked like this
>
>
>
I'm pretty sure I have to put something in the place of "nameserver". but I am just not sure what to put. Your help would be much appreciated.
Thanks,
Sam
Re: Problem installing anything with pacman
January 08, 2018 06:21PM
Hi,
this command is still valid and usable

sudo rm /etc/resolv.conf
sudo sh -c 'echo "nameserver 8.8.8.8" > /etc/resolv.conf '

nameserver is the keyword, 8.8.8.8 the IP of a valid nameserver (Google's nameserver).

best regards
Matthias
Thanks Matthias,

After googling around for a couple of ten minutes I stumbled upon your solution which was working absolutely. However I would like to understand why did this happened that suddenly pacman has stopped working ?

Thank you for you time,

Marcell
Re: Problem installing anything with pacman
March 11, 2019 07:21PM
You please refer on which post you are referring to?
And did you use the piratebox image?
Then I may be able to tell something about it
A random computer nerd.
Re: [SOLVED]Problem installing anything with pacman
October 15, 2019 06:57PM
You forgot the apostrophe at the end. I had the same thing happen to me when I left out the additional apostrophe at the end.