1

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

7
  • 1
    It's clear you have DNS issues. Check /etc/resolv.conf. It not that, then I would say you have no network setup. Commented Dec 17, 2021 at 16:27
  • Use Server = http://166.78.229.131/archlinux/$repo/os/$arch to check if it is DNS issue. This is the mirror name mirror.rackspace.com Commented Dec 17, 2021 at 16:52
  • @Bib What should I be looking for in that file? It exists and I will add to my question the contents of it. Commented Dec 20, 2021 at 23:25
  • @AbdullahIbnFulan Can you tell me, step by step, what you're asking me to do? I tried typing your idea in command line and got "Server: command not found" error. Commented Dec 20, 2021 at 23:27
  • Please don't post images of text. Commented Dec 21, 2021 at 4:07

4 Answers 4

3

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 
0
2
+200

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.

8
  • I added that line to the bottom of the file but still get the same error when running ping google.com Commented Dec 20, 2021 at 23:56
  • Check if you have your hostname set up(/etc/hostname) Commented Dec 20, 2021 at 23:58
  • Also try ip addr to check if your interface is up. Commented Dec 21, 2021 at 0:03
  • I have the name in /etc/hostname, though when I run hostname in terminal it says "command not found" Commented Dec 21, 2021 at 0:03
  • I added the output of ‘ip addr’ Commented Dec 21, 2021 at 0:08
0

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> 
6
  • I will try this. But why won't my internet work even when connected to my modem via Ethernet cable? Commented Dec 21, 2021 at 0:18
  • @Username there could be a driver problem since your Ethernet device does not show up in ip. You can check dmesg to see if there are any errors. If there isn't anything, you should check your BIOS settings to make sure Ethernet isn't disabled. Commented Dec 21, 2021 at 0:27
  • I just realized I accidentally unplugged the Ethernet cable. I plugged it back in and edited my question with the correct ip addr output. Still getting the same errors though. Commented Dec 21, 2021 at 0:28
  • @Username could be a DHCP issue as your Ethernet device is not being assigned an IP address by your router. Check your router settings if DHCP is correctly setup and if any other connected computers are being assigned IP addresses. Commented Dec 21, 2021 at 0:41
  • 1
    @Username I see that you have two DHCP clients running (dhcpcd and NetworkManager). This can cause conflicts so only one should be running. Disable dhcpcd: sudo systemctl disable --now dhcpcd.service Commented Dec 21, 2021 at 0:50
0

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
1
  • i had a similar issue. i did a whole system update (which included linux-firmware and others) and it broke DNS resolution. i reverted back to previous package versions I had cached (thanks to pacman -U /var/cache/pacman/pkg/<package_name>-<package_version>-<architecture>.pkg.tar.zst) and found out that for me, systemd/systemd-libs/systemd-sysvcompat were the culprits. reverted, rebooted, all OK again. Commented Oct 3 at 9:25

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.