Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to find the "go" binary from PATH #971

Closed
up9cloud opened this issue Nov 28, 2020 · 59 comments
Closed

Failed to find the "go" binary from PATH #971

up9cloud opened this issue Nov 28, 2020 · 59 comments
Milestone

Comments

@up9cloud
Copy link

What version of Go, VS Code & VS Code Go extension are you using?

  • Run go version to get version of Go
    • go version go1.15.2 darwin/amd64
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders
    • 1.51.1
      e5a624b788d92b8d34d1392e4c4d9789406efe8f
      x64
  • Check your installed extensions to get the version of the VS Code Go extension
    • v0.18.1
  • Run go env to get the go development environment details
    • GO111MODULE=""
      GOARCH="amd64"
      GOBIN=""
      GOCACHE="/Users/ss/Library/Caches/go-build"
      GOENV="/Users/ss/Library/Application Support/go/env"
      GOEXE=""
      GOFLAGS=""
      GOHOSTARCH="amd64"
      GOHOSTOS="darwin"
      GOINSECURE=""
      GOMODCACHE="/Users/ss/go/pkg/mod"
      GONOPROXY=""
      GONOSUMDB=""
      GOOS="darwin"
      GOPATH="/Users/ss/go"
      GOPRIVATE=""
      GOPROXY="https://proxy.golang.org,direct"
      GOROOT="/usr/local/Cellar/go/1.15.2/libexec"
      GOSUMDB="sum.golang.org"
      GOTMPDIR=""
      GOTOOLDIR="/usr/local/Cellar/go/1.15.2/libexec/pkg/tool/darwin_amd64"
      GCCGO="gccgo"
      ...

Share the Go related settings you have added/edited

None.

Describe the bug

Every time I restart vscode, it shows: Failed to find the "go" binary in either。GOROOT() or PATH(/usr/bin:/bin:/usr/sbin:/sbin). Check PATH, or Install Go and reload the window.

It seems the PATH(/usr/bin:/bin:/usr/sbin:/sbin) from the message is not my actual path:

$ cat /etc/paths
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
$ which go
/usr/local/bin/go

And if I manually did Developer: reload window once after terminal started, it would work without errors.

Steps to reproduce the behavior:

  1. Clear all settings about go in vscode, make it all defaults
  2. Make sure your executable go not in /usr/bin:/bin:/usr/sbin:/sbin
  3. Add sleep 15 to ~/.bash_profile to make terminal very slow to up
  4. Restart vocode

Screenshots or recordings

Screen Shot 2020-11-27 at 16 24 26

Refs may help:

@hyangah
Copy link
Contributor

hyangah commented Nov 30, 2020

Thanks for finding the references to the latest vscode work towards this issue. Looks like the process environment population got unstable in the recent releases of vscode. :-(

Until vscode team sorts out this and directs extension authors, let's make a link to the reference issue and recommend the "Reload the window" command.

@gopherbot
Copy link
Collaborator

Change https://golang.org/cl/276492 mentions this issue: src/goInstallTools: add reference for incorrect PATH issue

@gopherbot
Copy link
Collaborator

Change https://golang.org/cl/276493 mentions this issue: src/pathUtils: check /usr/local/bin/go for go

gopherbot pushed a commit that referenced this issue Dec 9, 2020
This is a frequently used installation path for
custom executables including go in newer mac, but
this isn't included in system default PATH.
Many users add this in their login shell, or
/etc/paths.d, but when VSCode fails to load the
environment, the users end up with the incomplete
PATH, and go couldn't be found. Since this problem
got worsened recently, add /usr/local/bin/go to
the fallback path list.

For #971

Change-Id: Ie635b58c835189fbf1523c71cf4b6bac5e8400e3
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/276493
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
Trust: Suzy Mueller <suzmue@golang.org>
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
@hyangah hyangah added this to the v0.20.0 milestone Dec 21, 2020
@gopherbot
Copy link
Collaborator

Change https://golang.org/cl/279727 mentions this issue: src/utils/pathUtils: return the default go path only if exists

gopherbot pushed a commit that referenced this issue Dec 28, 2020
https://go-review.googlesource.com/c/vscode-go/+/276493 meant
to add /usr/local/bin/go to the default path to search, but introduced
a bug - we shouldn't return the path if the go binary doesn't exist.

TODO: This function got complicated over time and deserves proper testing.

For #971
Fixes #1065

Change-Id: I3ddf90983a1f66d6d76a3f9a50eb528a93904f3c
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/279727
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
@gopherbot
Copy link
Collaborator

Change https://golang.org/cl/280592 mentions this issue: [release] src/utils/pathUtils: return the default go path only if exists

gopherbot pushed a commit that referenced this issue Dec 28, 2020
https://go-review.googlesource.com/c/vscode-go/+/276493 meant
to add /usr/local/bin/go to the default path to search, but introduced
a bug - we shouldn't return the path if the go binary doesn't exist.

TODO: This function got complicated over time and deserves proper testing.

For #971
Fixes #1065

Change-Id: I3ddf90983a1f66d6d76a3f9a50eb528a93904f3c
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/279727
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
(cherry picked from commit dd9c54f)
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/280592
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
@kwsorensen
Copy link

kwsorensen commented Aug 29, 2021

I am running into this problem as well.

Error on load:
Failed to find the "go" binary in either GOROOT() or PATH(/home/kyles/.vscode-server/bin/3866c3553be8b268c8a7f8c0482c0c0177aa8bfa/bin:/home/kyles/go/bin:/bin:/home/kyles/.nvm/versions/node/v10.24.1/bin:/usr/local/bin/pact/bin:/snap/bin:/home/kyles/.vscode-server/bin/3866c3553be8b268c8a7f8c0482c0c0177aa8bfa/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/kubebuilder/bin). Check PATH, or Install Go and reload the window. If PATH isn't what you expected, see https://github.com/golang/vscode-go/issues/971

Commands on shell:
go env
GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/kyles/.cache/go-build" GOENV="/home/kyles/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/home/kyles/.gvm/pkgsets/go1.15.6/global/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/kyles/.gvm/pkgsets/go1.15.6/global" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/home/kyles/.gvm/gos/go1.15.6" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/home/kyles/.gvm/gos/go1.15.6/pkg/tool/linux_amd64" GCCGO="gccgo" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build617534469=/tmp/go-build -gno-record-gcc-switches"

go version
go version go1.15.6 linux/amd64

echo $GOPATH
/home/kyles/.gvm/pkgsets/go1.15.6/global

code -v
1.59.1 3866c3553be8b268c8a7f8c0482c0c0177aa8bfa x64

@R2D34
Copy link

R2D34 commented Sep 12, 2021

I also had the same problem.

Installing the go in the default directory suggested in go docs (/usr/local/go) solved the problem for me. Probably the extension uses some hard typed path resolution 😢 .

@kroksys
Copy link

kroksys commented Sep 27, 2021

I had this issue and resolved by overriding goroot variable in VSC.

  1. Shift + Cmd + P
  2. Search for: "open settings" and choose "Open Settings (JSON)"

Screenshot 2021-09-27 at 11 41 15

  1. $ go env and Copy GOROOT value (in my case its "/opt/homebrew/Cellar/go/1.17.1/libexec").
  2. add new record to settings.json: "go.goroot": "Copied/GOROOT/path",
    in my case its: "go.goroot": "/opt/homebrew/Cellar/go/1.17.1/libexec",

Screenshot 2021-09-27 at 11 53 19

Good luck!

@gcstang
Copy link

gcstang commented Oct 1, 2021

Why is this using a hardcoded path?

This is constantly erroring and the only current resolution was posted by @kroksys however this would need to be updated every time the version changes.

Please open this issue back up and fix it as the terminal works properly it's just this plugin that has an issue.
$ go version
go version go1.17.1 darwin/amd64

@stamblerre
Copy link
Contributor

@gcstang: If you are encountering a problem, please open a new issue and fill out the issue template. Also, please see the Troubleshooting guide.

@armenic
Copy link

armenic commented Oct 30, 2021

I had this issue and resolved by overriding goroot variable in VSC.

1. Shift + Cmd + P

2. Search for: "open settings" and choose "Open Settings (JSON)"
Screenshot 2021-09-27 at 11 41 15
1. $ **go env** and  Copy **GOROOT** value (in my case its "/opt/homebrew/Cellar/go/1.17.1/libexec").

2. add new record to settings.json: "go.goroot": "Copied/GOROOT/path",
   in my case its: "go.goroot": "/opt/homebrew/Cellar/go/1.17.1/libexec",
Screenshot 2021-09-27 at 11 53 19

Good luck!

Thanks so much @kroksys! I looked up the GOROOT variable with go env then copied the value in the settings as you specified.

@imageslr
Copy link

Why is this using a hardcoded path?

This is constantly erroring and the only current resolution was posted by @kroksys however this would need to be updated every time the version changes.

Please open this issue back up and fix it as the terminal works properly it's just this plugin that has an issue. $ go version go version go1.17.1 darwin/amd64

I'm using gvm to manage go version. Everytime I switch the go version, I have to modify vscode setting to avoid this problem. That's inconvenient.

@gcstang
Copy link

gcstang commented Dec 17, 2021

Why is this using a hardcoded path?
This is constantly erroring and the only current resolution was posted by @kroksys however this would need to be updated every time the version changes.
Please open this issue back up and fix it as the terminal works properly it's just this plugin that has an issue. $ go version go version go1.17.1 darwin/amd64

I'm using gvm to manage go version. Everytime I switch the go version, I have to modify vscode setting to avoid this problem. That's inconvenient.

@imageslr See if this solution helps you
#1823

@imageslr
Copy link

Thank you @gcstang

@bittopaz
Copy link

bittopaz commented Jan 18, 2022

It works for me with the config as below, so I don't have to update the config after each brew upgrade go.

"go.alternateTools": {
    "go": "/opt/homebrew/bin/go"
}

@SebastianKristof
Copy link

SebastianKristof commented Jan 25, 2022

It works for me with the config as below, so I don't have to update the config after each brew upgrade go.

"go.alternateTools": {
    "go": "/opt/homebrew/bin/go"
}

The above worked for me (thank you @bittopaz), while the previous solution with "go.goroot" gave the following error:

image

@ikingye
Copy link

ikingye commented Feb 7, 2022

My VSCode was fine before, and today the problem just popped up.
I just restart my vscode, and problem is solved like magic.

@canispeakchinese
Copy link

My VSCode was fine before, and today the problem just popped up. I just restart my vscode, and problem is solved like magic.

so am i

@uguryilmazunified
Copy link

Adding go.goroot to json file didn't work for me;

"go.alternateTools": {
"go": "/opt/homebrew/bin/go"
} is working for me and if anyone is having trouble finding the variable for goroot value or if it doesn't come up in $go env, you can find it via which go , this should be the value of goroot

@MetaStag
Copy link

For anyone for whom the above steps didn't work: check if you have the flatpak version of vs code/codium installed. It is a sandboxed environment, so it can't access your go tool suite.

That's what happened to me, so i uninstalled the flatpak and installed the standard version following the instructions here, works like a charm :)

@tompave
Copy link

tompave commented Apr 18, 2022

Another solution is to always start VS Code with the code command, i.e. code .. So that it will inherit the env from your shell.

@simonireilly
Copy link

simonireilly commented May 5, 2022

It works for me with the config as below, so I don't have to update the config after each brew upgrade go.

"go.alternateTools": {
    "go": "/opt/homebrew/bin/go"
}

Yeah, this is the one that worked best for me, I am using .asdf and it works for changing go version aswell.

which go
/Users/simonreilly/.asdf/shims/go

Then as above mark it in the settings:

  "go.alternateTools": {
    "go": "/Users/simonreilly/.asdf/shims/go"
  }

@peitili
Copy link

peitili commented Mar 2, 2023

With Newest VS Code 1.76.0 the settings is split to default, user, and workspace settings, and you might want to change the user settings. Default settings is read-only.

image

image

@lapo-luchini
Copy link

On SteamDeck I used:

conda install go

and then in settings.json:

    "go.alternateTools": {
        "go": "/home/deck/miniconda3/bin/go"
    }

… and it works even if flatpak avoid my PATH to be inherited.

@aesophor
Copy link

🤦🏻

@rikusen0335
Copy link

I've been using rtx, similar to asdf.
I tried most workaround in this issue but they still doesn't fix the issue

I thought my env is right. This is my output from m2 mac:

> go env
...
GOPATH="/Users/user/.local/share/rtx/installs/golang/1.20/packages"
GOROOT="/Users/user/.local/share/rtx/installs/golang/1.20/go"
...

> echo $PATH
/Users/user/.local/share/rtx/installs/golang/1.20/go/bin:/Users/user/.local/share/rtx/installs/golang/1.20/packages/bin:...

Also set JSON config to:

  "go.gopath": "/Users/user/.local/share/rtx/installs/golang/1.20/go/bin",
  "go.alternateTools": {
    "go": "/Users/user/.local/share/rtx/installs/golang/1.20/go/bin"
  }

Reloading code and Restarting pc doesn't fix this too.

@rikusen0335
Copy link

And though, finally, I installed go with brew (brew install go) code loads go fine. What a....

@BillZong
Copy link

It works for me with the config as below, so I don't have to update the config after each brew upgrade go.

"go.alternateTools": {
    "go": "/opt/homebrew/bin/go"
}

The above worked for me (thank you @bittopaz), while the previous solution with "go.goroot" gave the following error:

image

This is a better idea since we don't need to hard code GOROOT path, which might be change when we upgrade go version.

@AbbyDeng
Copy link

image

@ldemailly
Copy link

On a Mac:

sudo ln -s /opt/homebrew/bin/go /usr/bin/go

to not have to edit any settings etc

@JasonLou99
Copy link

Just like above, but you should open workspace settings, then there will be a .vscode/settings.json in your work directory.You can set go bin path in that settings.json:

{
    "go.alternateTools": {
        "go": "/home/jason/go/bin/go",
    },
}

@zztaki
Copy link

zztaki commented Jun 12, 2023

I had this issue and resolved by overriding goroot variable in VSC.我遇到了这个问题,并通过覆盖 VSC 中的 goroot 变量解决了这个问题。

  1. Shift + Cmd + P移位 + 厘米d + P
  2. Search for: "open settings" and choose "Open Settings (JSON)"搜索:“打开设置”,然后选择“打开设置(JSON)”
Screenshot 2021-09-27 at 11 41 15
  1. $ go env and Copy GOROOT value (in my case its "/opt/homebrew/Cellar/go/1.17.1/libexec").$ go env 和 Copy GOROOT 值(在我的例子中是“/opt/homebrew/Cellar/go/1.17.1/libexec”)。
  2. add new record to settings.json: "go.goroot": "Copied/GOROOT/path",将新记录添加到 settings.json: “go.goroot”: “copyed/GOROOT/path”,
    in my case its: "go.goroot": "/opt/homebrew/Cellar/go/1.17.1/libexec",在我的例子中,它是:“go.goroot”: “/opt/homebrew/Cellar/go/1.17.1/libexec”,
Screenshot 2021-09-27 at 11 53 19

Good luck! 祝你好运!

Thank you for your help!

@eitamal
Copy link

eitamal commented Oct 5, 2023

For me it failed when I installed go using rtx. I saw antoher comment from someone who didn't manage to get it working with rtx, so just posting my solution (pretty much identical to asdf):

{
    "go.alternateTools": {
        "go": "<home-path>/.local/share/rtx/shims/go",
     }
}

@mftcodes
Copy link

mftcodes commented Nov 11, 2023

I'm on PopOS Go installation (GOROOT) was installed on /home/username/go/root/go GOPATH was set to /home/username/go PATH variable in .bashrc was appended with :$HOME/go/root/go/bin:$HOME/go/bin setting.json added:

 "go.goroot": "/home/username/go/root/go",
 "go.gopath": "/home/username/go"

Reason gopath and goroot was set differently was because we don't want packages from the internet dumped into the official installation.

I cannot get anything listed above to work for me. Still cannot find GOROOT.
The above seemed the most viable option given I'm on PopOS; however, when using the value from which go (/usr/local/go/bin/) I get a secondary error:

go.goroot setting is ignored. /usr/local/go is not a valid GOROOT directory.

I'm out of ideas here...

EDIT: Solution found, I had installed from the PopOS store an unofficial flatpak of VSCodium. I installed it from source, and no more issues.

@Alan3344
Copy link

I had this issue and resolved by overriding goroot variable in VSC.

1. Shift + Cmd + P

2. Search for: "open settings" and choose "Open Settings (JSON)"
Screenshot 2021-09-27 at 11 41 15 ``` 1. $ **go env** and Copy **GOROOT** value (in my case its "/opt/homebrew/Cellar/go/1.17.1/libexec").
  1. add new record to settings.json: "go.goroot": "Copied/GOROOT/path",
    in my case its: "go.goroot": "/opt/homebrew/Cellar/go/1.17.1/libexec",


    
      
    

      
    

    
  
<img alt="Screenshot 2021-09-27 at 11 53 19" width="426" src="https://user-images.githubusercontent.com/15876796/134876673-c4c21405-02c3-40fd-a09a-b34365f1035a.png">
Good luck!

Thanks so much @kroksys! I looked up the GOROOT variable with go env then copied the value in the settings as you specified.

I restarted my MAC and this error appears every time I open it.
Set these two lines of configuration and open it again to solve the problem successfully.
Thank you so much.

image

image

@TheUncleRemus
Copy link

Hi, if you want I have published the correct guide useful to use go with visual-studio-code as IDE, installed by flatpak. You can found the repo at https://github.com/TheUncleRemus/flapak-vscode-as-go-ide

@danurahadi
Copy link

Hi, if you want I have published the correct guide useful to use go with visual-studio-code as IDE, installed by flatpak. You can found the repo at https://github.com/TheUncleRemus/flapak-vscode-as-go-ide

Thanks @TheUncleRemus . This is the solution I'm searching for and also frustrating me. But, I've decided to use GoLand instead. hahhhaa

tomwheeler added a commit to temporalio/edu-102-go-code that referenced this issue Mar 28, 2024
tomwheeler added a commit to temporalio/edu-101-go-code that referenced this issue Mar 28, 2024
@gullitmiranda
Copy link

in my case the problem was the mise/asdf shims. To fix this I just run:

mise reshim go

The shim symlink before and after:

la /Users/user/.local/share/mise/shims/go

# before
/Users/user/.local/share/mise/shims/go -> /Users/user/.local/share/mise/shims/go
# after
/Users/user/.local/share/mise/shims/go -> /opt/homebrew/opt/mise/bin/mise

@buitcj
Copy link

buitcj commented May 16, 2024

manjaro users might attempt installing vscode and the go extension from AUR instead of via flatpak. This worked for me.

@StrayDragon
Copy link

After some testing, I found that if I configure the go path (GOROOT/PATH) in the .profile file and then log out of the computer or restart and reopen VSCode

The reason might be that VSCode or this plugin does not seem to read the .bash_profile when accessing environment variables. The test results show that it retrieves environment variables through .profile on the user's login side.

Config look like this:

# in .profile
# ...
export GOROOT=$HOME/go
export PATH=$PATH:$GOROOT/bin

@Adesoji1
Copy link

Adesoji1 commented Aug 11, 2024 via email

@bravepickle
Copy link

For anyone for whom the above steps didn't work: check if you have the flatpak version of vs code/codium installed. It is a sandboxed environment, so it can't access your go tool suite.

That's what happened to me, so i uninstalled the flatpak and installed the standard version following the instructions here, works like a charm :)

I found a solution for setup VSCode with Flatpak. It is quite simple. In my case I needed to change paths in the plugin settings /usr/local/go -> /run/host/usr/local/go:

{
    "go.goroot": "/run/host/usr/local/go"
}

Thats it! The reason for it is rather simple - Flatpak is a sandboxed environment but some paths are shared (or can be shared by adding extra flags) with host environment. In my case GO was installed to its standard path - /usr/local/go, but it it was mounted to /run/host folder. More information on permissions and how are they are shared can be read here. Also it might be helpful to try finding what files are shared and where they are on Flatpak sandbox environment by running command flatpak run --command=sh com.visualstudio.code. Alternative for it is to look at terminal in VS Code IDE directly. Good luck!

@BoscoDomingo
Copy link

BoscoDomingo commented Sep 6, 2024

For anyone using mise (formerly rtx) the solution is to point to wherever mise where go or which go says (which should be the mise folder).

However, this will pin it to one specific version due to what seems like a bug (in my case mise install go@latest installed 1.23.0 instead of 1.23.1 as of writing, and saved it to ~/.local/share/mise/installs/go/1.23.0).

To fix this, use the asdf-golang plugin (mise p i https://github.com/asdf-community/asdf-golang) which will install it correctly to ~/.local/share/mise/installs/go/latest/go/bin/go (no need; mise does create the latest folder, just doesn't symlink correctly atm, but it works with VS Code) which you can then add to your settings.json:

"go.alternateTools": {
    "go": "~/.local/share/mise/installs/go/latest/go/bin/go"
},

@Md-Kasali
Copy link

For anyone for whom the above steps didn't work: check if you have the flatpak version of vs code/codium installed. It is a sandboxed environment, so it can't access your go tool suite.

That's what happened to me, so i uninstalled the flatpak and installed the standard version following the instructions here, works like a charm :)

I'm a Linux user. I followed your instructions and it works. This made my day. Thank you so much.

@DigiConvent
Copy link

So just to be sure, I enter "go env | grep GOROOT" in my terminal and copy that value into go.goroot into the vscode settings?

@starxchina
Copy link

starxchina commented Sep 20, 2024

remote link to ubuntu 22.04, and I finally got success through these steps:
install go in /usr/local, like this:

/usr/local ❯ ls go                                                                                                                                                                          
api  bin  codereview.cfg  CONTRIBUTING.md  doc  go.env  lib  LICENSE  misc  PATENTS  pkg  README.md  SECURITY.md  src  test  VERSION

/usr/local ❯ echo "export PATH=\$PATH:/usr/local/go/bin" >> /etc/profile
/usr/local ❯ source /etc/profile
/usr/local ❯ go version

@pgollucci
Copy link

All of this is daft and still broken in 2024.

My PATH is correct. I used brew to install VS Code. I used code -n to start vscode.
I'm using goenv. The shim is in my path.

GOENV_ROOT=$HOME/.p6/syndbg/goenv
GOENV_SHELL=zsh
GOROOT=$HOME/.p6/syndbg/goenv/versions/1.23.2
GOPATH=$HOME/go/1.23.2

$ go version; which go
go version go1.23.2 darwin/arm64
$HOME/.p6/syndbg/goenv/shims/go

@dwrolvink
Copy link

Specifically for using vscode on Windows, using Remote-SSH to connect to a RHEL9 VM. The solution for me was this: https://stackoverflow.com/a/62391678

I.e.: Press F1 or ctrl+shift+p and choose: Remote-SSH: Kill VS Code Server on Host. Then F1 and choose: Reload Window. This gets the server to reload the PATH (assuming you have this configured in your ~/.bashrc or similar file).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests