60

Error Message:

/usr/bin/wg-quick: line 31: resolvconf: command not found

The issue:

I am not fully certain, I do have openresolv installed rn and have tried it and got the same response when resolvconf is installed.

Either way, I cannot connect to my VPN.

Jimmy32
  • 601
  • 1
  • 5
  • 4

7 Answers7

72

Modern Linux distributions use systemd, which comes with its own flavor of resolvconf as part of the resolvectl command. See manpage. A symlink called resolvconf can be created somewhere in $PATH.

  • On Arch linux there's the systemd-resolvconf package that does this for you.
  • On Debian (and Ubuntu?) you must do this manually. Using /usr/local to prevent possible package conflicts:
    ln -s /usr/bin/resolvectl /usr/local/bin/resolvconf
    

With the symlink in place, wg-quick works fine for me.

Edit: There is a Debian bug report requesting the symlink

Stefan
  • 103
  • 4
Tim
  • 1,083
  • 9
  • 13
  • 2
    I had to run the command `systemctl enable systemd-resolved.service` otherwise I got "Failed to set DNS configuration" – sam1370 Sep 12 '20 at 21:47
40

Had the same problem, found on this page: https://github.com/StreisandEffect/streisand/issues/1434

sudo apt install openresolv

Resolved it for me.

thomasrive
  • 593
  • 5
  • 8
6

just install it with apt-get install resolvconf and reboot, or comment out all DNS fields in configuration file

Iceberg
  • 171
  • 1
  • 2
4

It’s not the solution, but if you comment out the DNS in the wg0 conf file it will work. wg-quick does a bunch of things behind the scenes, one of them is adjusting the nameserver, typically to use your vpn providers. Set your /etc/resolv.conf to use Cloudflare (1.1.1.1), then try again. It should connect without the resolvconf dependency.

4

Seems like resolvconf command is missing in your system or it isn't installed, try this:

sudo apt install resolvconf
XandrOSS
  • 51
  • 2
  • 1
    As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Apr 30 '22 at 05:10
3

Try using systemctl instead:

systemctl start wg-quick@<vpn-name>

Or if you wish to start the VPN every time you start your machine use:

systemctl enable wg-quick@<vpn-name>

curiouser
  • 103
  • 4
John53
  • 79
  • 1
1

note, cannot install resolvconf inside lxd/lxc container because it breaks oth er things. commenting out the DNS entry in the wireguard and the sybmolic link mentioned above seems to work in lxc containers.

  • This does not provide an answer to the question. Once you have sufficient [reputation](https://superuser.com/help/whats-reputation) you will be able to [comment on any post](https://superuser.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/1135347) – Toto Jul 16 '22 at 16:22
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jul 16 '22 at 16:25