-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
installed go for first time $GOHOME not defined, go not in path #34132
Comments
The installer should have created the PATH entry at
FWIW I couldn't reproduce this (I'm running macOS Catalina if that's any help). |
(base) C02PVMF5G8WP:hello dritchie$ more /etc/paths.d/go |
@deritchie - Please restart your shell for the PATH change to take effect. Let us know if that works. |
I rebooted the machine (Macbook) and I am still seeing the same issue. Note (base) C02PVMF5G8WP:~ dritchie$ echo $PATH | grep go bash-3.2$ echo $PATH | grep go |
Is there some script that would normally do this setup that would normally be ran as part of the package install? It looks like that may not have ran correctly. |
let me also ask explicitly... when you say 'restart your shell', are you asking for something that would not occur as a result of a power off/power on of the laptop? |
@deritchie No, your shell would definitely be restarted with a power off. Can you still not find a If after restarting and you still can't use the eval `/usr/libexec/path_helper -s` And try again. (From: https://apple.stackexchange.com/questions/128897/how-to-use-etc-paths-d-to-add-executable-files-to-my-path). If this works, it's most likely an OS level issue rather than a Additionally, your GOPATH seems to already be in it's default location, so the |
Hi @deritchie - This sounds like some issue with your shell/machine. I would suggest you to ask for help in one of the forums here:
You will get better help there. This issue tracker is only for tracking bugs and feature proposals. Thanks |
MacOS X version is not mentionned. Otherwise, might be a permission issue?
|
As @agnivade mentioned, this seems to be a question and not a bug or feature request for Go itself. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
did the standard 'go build' after creating hello.go in directory /Users/dritchie/go/src/hello
but it didn't find add go to $PATH or create $GOPATH.
(base) C02PVMF5G8WP:hello dritchie$ /usr/local/go/bin/go build
(base) C02PVMF5G8WP:hello dritchie$ hello
hello, world
(base) C02PVMF5G8WP:hello dritchie$ go build
-bash: go: command not found
(base) C02PVMF5G8WP:hello dritchie$ echo $GOPATH
(base) C02PVMF5G8WP:hello dritchie$
What did you expect to see?
a prompt after a successful compile of hello.go
What did you see instead?
could not find the go executable.
Did I miss a step on install? I just installed the go pkg that I downloaded.
The text was updated successfully, but these errors were encountered: