rootless-containers / slirp4netns

User-mode networking for unprivileged network namespaces
GNU General Public License v2.0
729 stars 82 forks source link

Can't use binary (Ubuntu 18.04) #286

Closed relativeflux closed 2 years ago

relativeflux commented 2 years ago

Hi,

I'm struggling to get Docker to find the slirp4netns binary I downloaded. I am running the Docker rootless mode install 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 am on Ubuntu 18.04 LTS. I understand slirp4netns is available as a package for Ubuntu 20, but I don't really want to upgrade my entire OS just to get a single library.

Thanks.

AkihiroSuda commented 2 years ago

I moved the binary (as root) to /usr/local/lib

Did you mean /usr/local/bin ?

relativeflux commented 2 years ago

@AkihiroSuda Hi - many apologies, no I had it in /usr/local/lib, which I was under the impression was on PATH... If only I'd checked (it's not). I moved the binary to /usr/local/bin, and it is of course visible there since that is indeed on PATH.

I managed to run the rootless mode install script after that change. Sorry for the noise!