jstarks / npiperelay

npiperelay allows you to access Windows named pipes from WSL
MIT License
660 stars 71 forks source link

installation instructions are now out of date #25

Open stevenpollack opened 2 years ago

stevenpollack commented 2 years ago

I don't know anything about go, never mind go get, but when I installed the latest version 1.18 inside WSL2, I was alerted to use go install instead of go get. So, what I ended up having to do to use this to pipe through windows:

GOOS=windows go install github.com/jstarks/npiperelay@latest

For future people who land here:

you'll want to check your GOPATH via

go env GOPATH

and then make sure that npiperelay.exe is in your GOBIN -- which might be something like /home/<USER>/go/bin/. I then ended up having to setup a symlink as so

sudo ln -s /home/<USER>/go/bin/windows_amd64/npiperelay.exe /usr/local/bin/npiperelay.exe

there was no need to link this back to my windows user.

paul-vd commented 2 years ago

Thanks for the info, for more details on the issue, I also just ran it in a new environment and I got this:

➜  local go get -d github.com/jstarks/npiperelay
go: go.mod file not found in current directory or any parent directory.
        'go get' is no longer supported outside a module.
        To build and install a command, use 'go install' with a version,
        like 'go install example.com/cmd@latest'
        For more information, see https://golang.org/doc/go-get-install-deprecation
        or run 'go help get' or 'go help install'.
MichaelHipp commented 2 years ago

I also had to do unset GOBIN for it to work. Complains it can't install cross-compiled binary when GOBIN is set.

xdhmoore commented 5 months ago

I also don't know anything about go. For compiling/installing in Windows (not cross-compiling from WSL) all I had to do was:

 go install github.com/jstarks/npiperelay@latest

After that the binary was already available on the path and from within WSL.