Setting GO environment variables (GOPATH, GOBIN)
See original GitHub issue2019-08-15T22:05:36.9141345Z env:
2019-08-15T22:05:36.9141441Z GOROOT: /opt/hostedtoolcache/go/1.12.0/x64
2019-08-15T22:05:36.9141482Z ##[endgroup]
2019-08-15T22:05:37.0161150Z LEIN_HOME=/usr/local/lib/lein
2019-08-15T22:05:37.0161985Z M2_HOME=/usr/share/apache-maven-3.6.1
2019-08-15T22:05:37.0162146Z BOOST_ROOT=/usr/local/share/boost/1.69.0
2019-08-15T22:05:37.0162236Z GOROOT_1_11_X64=/usr/local/go1.11
2019-08-15T22:05:37.0162330Z ANDROID_HOME=/usr/local/lib/android/sdk
2019-08-15T22:05:37.0162641Z JAVA_HOME_11_X64=/usr/lib/jvm/zulu-11-azure-amd64
2019-08-15T22:05:37.0162818Z LANG=C.UTF-8
2019-08-15T22:05:37.0162931Z INVOCATION_ID=e226194a393e43d59aba6bd4c85af030
2019-08-15T22:05:37.0163149Z JAVA_HOME_12_X64=/usr/lib/jvm/zulu-12-azure-amd64
2019-08-15T22:05:37.0163325Z ANDROID_SDK_ROOT=/usr/local/lib/android/sdk
2019-08-15T22:05:37.0163420Z RUNNER_TOOL_CACHE=/opt/hostedtoolcache
2019-08-15T22:05:37.0163674Z JAVA_HOME=/usr/lib/jvm/zulu-8-azure-amd64
2019-08-15T22:05:37.0163967Z RUNNER_TRACKING_ID=github_28b0e254-504e-46ce-b1ab-b1db282d32b4
2019-08-15T22:05:37.0164043Z GITHUB_ACTIONS=true
2019-08-15T22:05:37.0164178Z DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
2019-08-15T22:05:37.0164238Z USER=runner
2019-08-15T22:05:37.0164303Z GITHUB_HEAD_REF=
2019-08-15T22:05:37.0164521Z GITHUB_ACTOR=radu-matei
2019-08-15T22:05:37.0164594Z GITHUB_ACTION=run
2019-08-15T22:05:37.0164676Z GRADLE_HOME=/usr/share/gradle
2019-08-15T22:05:37.0164763Z PWD=/home/runner/work/signy/signy
2019-08-15T22:05:37.0164871Z HOME=/home/runner
2019-08-15T22:05:37.0164966Z GOROOT=/opt/hostedtoolcache/go/1.12.0/x64
2019-08-15T22:05:37.0165060Z JOURNAL_STREAM=9:26649
2019-08-15T22:05:37.0165324Z JAVA_HOME_8_X64=/usr/lib/jvm/zulu-8-azure-amd64
2019-08-15T22:05:37.0165421Z RUNNER_TEMP=/home/runner/work/_temp
2019-08-15T22:05:37.0165510Z CONDA=/usr/share/miniconda
2019-08-15T22:05:37.0165615Z BOOST_ROOT_1_69_0=/usr/local/share/boost/1.69.0
2019-08-15T22:05:37.0165753Z RUNNER_WORKSPACE=/home/runner/work/signy
2019-08-15T22:05:37.0166170Z GITHUB_REF=refs/heads/gh-actions
2019-08-15T22:05:37.0166286Z GITHUB_SHA=419522609132ac1c17aed7d67e84e855de049c5e
2019-08-15T22:05:37.0166418Z GOROOT_1_12_X64=/usr/local/go1.12
2019-08-15T22:05:37.0166504Z DEPLOYMENT_BASEPATH=/opt/runner
2019-08-15T22:05:37.0166638Z GITHUB_EVENT_PATH=/home/runner/work/_temp/_github_workflow/event.json
2019-08-15T22:05:37.0166705Z RUNNER_OS=Linux
2019-08-15T22:05:37.0166811Z GITHUB_BASE_REF=
2019-08-15T22:05:37.0167013Z VCPKG_INSTALLATION_ROOT=/usr/local/share/vcpkg
2019-08-15T22:05:37.0167113Z PERFLOG_LOCATION_SETTING=RUNNER_PERFLOG
2019-08-15T22:05:37.0167581Z JAVA_HOME_7_X64=/usr/lib/jvm/zulu-7-azure-amd64
2019-08-15T22:05:37.0167657Z RUNNER_USER=runner
2019-08-15T22:05:37.0167712Z SHLVL=1
2019-08-15T22:05:37.0167844Z GITHUB_REPOSITORY=engineerd/signy
2019-08-15T22:05:37.0167932Z GITHUB_EVENT_NAME=push
2019-08-15T22:05:37.0168211Z LEIN_JAR=/usr/local/lib/lein/self-installs/leiningen-2.9.1-standalone.jar
2019-08-15T22:05:37.0168321Z RUNNER_PERFLOG=/home/runner/perflog
2019-08-15T22:05:37.0168438Z GITHUB_WORKFLOW=Go
2019-08-15T22:05:37.0168514Z ANT_HOME=/usr/share/ant
2019-08-15T22:05:37.0168631Z PATH=/opt/hostedtoolcache/go/1.12.0/x64/bin:/usr/share/rust/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
2019-08-15T22:05:37.0168788Z GITHUB_WORKSPACE=/home/runner/work/signy/signy
2019-08-15T22:05:37.0168994Z CHROME_BIN=/usr/bin/google-chrome
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:24 (6 by maintainers)
Top Results From Across the Web
Getting Started with Go Programming | Developer.com
The GOBIN environment variable refers to the bin directory inside the go installation directory such as $GOROOT/bin. Setting up this environment ...
Read more >GOBIN not set: cannot run go install - Stack Overflow
The Go path is a list of directory trees containing Go source code. It is consulted to resolve imports that cannot be found...
Read more >Getting started with Go. Installing Go on your system, setting…
GOBIN is another environment variable that Go uses to put binary files created using go install command. By default, GOBIN is $GOPATH/bin but ......
Read more >How to Write Go Code (with GOPATH)
The GOPATH environment variable. The GOPATH environment variable specifies the location of your workspace. It defaults to a directory named go inside your...
Read more >GOPATH, GOROOT, GOBIN - Essential Programming Books
Since Go 1.8, if GOPATH environment variable is not set, it defaults to $HOME/go on Unix/Linux and %USERPROFILE%/go on Windows.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I agree with @lmittmann here - provide sane defaults for
$GOPATH
and$GOBIN
, and allow users to change them if needed.Also, it would be really convenient if the source code was placed in
$GOPATH/{repository}
directly.Hi guys,
I also encountered this problem and I managed to solve it by adding this step. Works on all environments: