'Docker rootless mode setup tool script can't find slirp4netns binary

I am trying to set up Docker rootless mode on Ubuntu 18.04, using the dockerd-rootless-setuptool.sh script. But I'm struggling to get the script to find the slirp4netns binary I downloaded (slirp4netns provides user-mode networking for unprivileged network namespaces). On Ubuntu 20 this is installable as a package using apt, but for lower Ubuntu versions a pre-built binary is provided here.

I am running the script (as non-root) with:

dockerd-rootless-setuptool.sh install

But it complains:

Either slirp4netns (>= v0.4.0) or vpnkit needs to be installed

I have downloaded the latest stable binary for slirp4netns (v1.1.12) as per the instructions:

curl -o slirp4netns --fail -L https://github.com/rootless-containers/slirp4netns/releases/download/v1.1.12/slirp4netns-$(uname -m)
chmod +x slirp4netns

I moved the binary (as root) to /usr/local/lib. What am I doing wrong? Do I need to update an environment variable? I don't really want to upgrade my entire OS just to get a single library.

Thanks.



Solution 1:[1]

It was my own stupidity. As the person says in the comment to my question, all I needed to do was to move the binary to /usr/local/bin. I had assumed /usr/local/lib was on PATH, but it wasn't.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ChrisM