<p>I'm having trouble setting up Go App engine. Should the google-cloud-sdk path be in GOROOT or GOPATH?</p>
<p>I put the google-cloud-sdk in /usr/local</p>
<p>It looks like there is source code in: goroot/</p>
<pre><code>/usr/local/google-cloud-sdk/platform/google_appengine/goroot/
</code></pre>
<p>go env </p>
<pre><code>GOPATH="/usr/local/google-cloud-sdk/platform/google_appengine/goroot"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
</code></pre>
<p>$ go get</p>
<pre><code>package google.golang.org/appengine: cannot download, /usr/local/google-cloud-sdk/platform/google_appengine/goroot is a GOROOT, not a GOPATH. For more details see: 'go help gopath'
package google.golang.org/appengine/datastore: cannot download, /usr/local/google-cloud-sdk/platform/google_appengine/goroot is a GOROOT, not a GOPATH. For more details see: 'go help gopath'
</code></pre>
<p>I appended the path to google-cloud-sdk: </p>
<pre><code>export GOROOT="/usr/local/go/:/usr/local/google-cloud-sdk/platform/google_appengine/goroot"
</code></pre>
<p>GO doesn't seem to like multiple paths in GOROOT:<br/>
$ go get </p>
<pre><code>go: cannot find GOROOT directory: /usr/local/go/:/usr/local/google-cloud-sdk/platform/google_appengine/goroot
</code></pre>
<p>I did run the ./install.sh script after I copied the source to /usr/local</p>
<p>The additional PATH's added did not fix the errors I was having.</p>
Should google-cloud-sdk be in /usr/local? Which directory should be added to GOPATH?
agolangf · · 406 次点击这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
0 回复
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传