goinstall 不被识别为内部或外部命令

标签 go

我正在尝试安装“goinstall github.com/alloy-d/goauth”,但它不工作。出现以下错误。

goinstall github.com/alloy-d/goauth

'goinstall' is not recognized as an internal or external command,
operable program or batch file.

我也尝试了 git 克隆,但它没有创建精确的结构。

git clone git://github.com/alloy-d/goauth

正在将它安装在“$GOPATH”中

最佳答案

明确地说,goinstall 曾经存在(现在是“go get”)。

如“Configuration versus convention”中所述:

Over the last few years we consistently reminded people about the goinstall command (now replaced by go get) and its conventions:

  • first, that the import path is derived in a known way from the URL of the source code;
  • second, that the place to store the sources in the local file system is derived in a known way from the import path;
  • third, that each directory in a source tree corresponds to a single package;
  • and fourth, that the package is built using only information in the source code. Today, the vast majority of packages follow these conventions.

因此您会发现使用“goinstall”的旧教程。

但在您的情况下,go get 然后 go install 会更好。
或者 go install -v github.com/alloy-d/goauth 查看详细信息(编译时包的名称)。

关于goinstall 不被识别为内部或外部命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26601205/

相关文章:

go - JSON响应附加到HTML模板输出

go - 同时,如何管理值/状态并避免竞争条件

go - 如何创建动态类型的变量

去结构比较

sockets - 如果没有 EOF,从 Golang 中的服务器读取 Unix Socket 响应的最佳方法是什么

go - c :=make(chan int) and c:=make(chan int, 1)有什么区别?

go - Race(?) with Mutex - map 中的数据损坏

go - 当指向结构的指针被替换时,GC 的行为如何

json - 使用 GoModifyTags 将 bson 标签添加到 go 结构

mongodb - 如何使用Golang在MongoDB中存储UUID?