6

I can't connect to the internet in chroot. For example, when I run apt update, I get a "temporary failure resolving". I tried copying resolv.conf over but still same error.

Charlie
  • 131

3 Answers3

7

This helped me.

echo "nameserver 8.8.8.8" > /etc/resolv.conf

or

echo "nameserver 8.8.8.8" > /run/systemd/resolve/stub-resolv.conf 
Vijay
  • 8,056
2

you should creat the folder /run/systemd/resolve with mkdir :

mkdir /run/systemd/resolve

then you can create the link with:

ln -sr /var/run/resolvconf/resolv.conf /run/systemd/resolve/stub-resolv.conf

after that, type sud apt-get update

0

It turned out that the files from /run/systemd/resolve weren't copied over to the guest system. After copying the files, internet works.

Charlie
  • 131