我该如何控制'去拿'放东西的地方? [英] How do I control where `go get` puts things?
本文介绍了我该如何控制'去拿'放东西的地方?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我去获取
一个包(比如 godoc
)时,它想要创建并安装它在 / usr / lib / go / bin
(这是一个使用库存Go包的Ubuntu系统)。
When I go get
a package (say, godoc
), it wants to create and install it in /usr/lib/go/bin
(this is an Ubuntu system using the stock Go packages).
这并不酷,因为就像一个好的Debian用户,我只让.deb软件包将东西安装到 / usr
。
This isn't cool, because like a good Debian user I only let .deb packages install stuff into /usr
.
我如何说服它安装到我的 GOPATH
工作区中,或者位于<$ c $下的某个位置c> / usr / local ?
How do I convince it to install into either my GOPATH
workspace, or somewhere under /usr/local
?
推荐答案
正确的答案证明正在安装 golang-go.tools
包。
The correct answer turned out to be installing the golang-go.tools
package.
这篇关于我该如何控制'去拿'放东西的地方?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文