Fresh Arch install: Lots of "could not resolve host" errors

I’ve just installed Arch. My computer is connected to my router/modem via Ethernet cable.

I just logged in and tried using pacman to install a package but got a bunch of "could not resolve host" errors.

enter image description here

When I run ping google.com it sometimes works but other times gives this error: Temporary failure in name resolution.

Output of ip addr
enter image description here

Contents of /etc/resolv.conf
enter image description here

Asked By: Username

||

It looks like you have both dhcpcd and network-manager installed. Having two packages to manage your network causes conflicts. Try uninstalling one of them.

Answered By: Gagan

According ip addr, it appears you have not connected and authenticated to a wireless network yet.

Use iwctl to connect to a network:

iwctl --passphrase <passphrase> station wlp1s0 connect <SSID>
Answered By: Snake

It’s generally a DNS-related issue. Since Arch is now typically dominated by Systemed, it’s likely that the problem lies with one of its daemons, systemd-resolved, which provides network name resolution to local applications.

So, the first step is to check its status:

systemctl status systemd-resolved

If you see that the value of Active field is inactive, you need to start it:

systemctl start systemd-resolved
Answered By: Li-Guangda

My particular issue was not having installed linux-firmware before rebooting without the flash ISO. The wireless device was missing altogether from ip addr. The solution was to :

  1. Boot from the arch iso.
  2. Use iwctl to connect to the wireless network
  3. After having installed a working network connection arch-chroot into my installation (mount it again if needed).
  4. pacman -S linux-firmware
Answered By: rtviii
Categories: Answers Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.