无法获取GoLang的oracle包。

huangapple go评论85阅读模式
英文:

Cannot get GoLang oracle package

问题

我完全不了解GoLang,所以很可能我搞砸了我的设置。

这是我的设置:

echo $GOPATH
/Users/name/Documents/Developer/Go_Workspace

这个是有效的。

name$ go get -v golang.org/x/tools/cmd/oracle

它在Go_Workspace文件夹下创建了两个子文件夹--> src、bin、pkg。

然后当我尝试:

go get -u golang.org/x/tools/cmd/oracle
package golang.org/x/tools/cmd/oracle: cannot find package "golang.org/x/tools/cmd/oracle" in any of:
	/usr/local/go/src/golang.org/x/tools/cmd/oracle (from $GOROOT)
	/Users/name/Documents/Developer/Go_Workspace/src/golang.org/x/tools/cmd/oracle (from $GOPATH)

当我启用-v时,我看到:

Fetching https://golang.org/x/tools/cmd/oracle?go-get=1
Parsing meta tags from https://golang.org/x/tools/cmd/oracle?go-get=1 (status code 200)
get "golang.org/x/tools/cmd/oracle": found meta tag main.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at https://golang.org/x/tools/cmd/oracle?go-get=1
get "golang.org/x/tools/cmd/oracle": verifying non-authoritative meta tag
Fetching https://golang.org/x/tools?go-get=1
Parsing meta tags from https://golang.org/x/tools?go-get=1 (status code 200)
golang.org/x/tools (download)
package golang.org/x/tools/cmd/oracle: cannot find package "golang.org/x/tools/cmd/oracle" in any of:
	/usr/local/go/src/golang.org/x/tools/cmd/oracle (from $GOROOT)
	/Users/name/Documents/Developer/Go_Workspace/src/golang.org/x/tools/cmd/oracle (from $GOPATH)

这是我的.bash_profile文件:

1 PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin
  2 export GOPATH=$HOME/Documents/Developer/Go_Workspace
  3 export PATH=$PATH:/usr/local/go/bin
  4 export PATH=$PATH:$GOPATH/bin

你能帮我解决这个问题吗?我搞砸了什么?我在MacOS上使用bash终端。

英文:

I am completely new to GoLang, so chances are I messed up my setup.

Here is what I have :

echo $GOPATH
/Users/name/Documents/Developer/Go_Workspace

This one worked.

name$ go get -v golang.org/x/tools/cmd/oracle

It created 2 subfolders inside the Go_Workspace --> src, bin , pkg.

Then when I try :

go get -u golang.org/x/tools/cmd/oracle
package golang.org/x/tools/cmd/oracle: cannot find package "golang.org/x/tools/cmd/oracle" in any of:
	/usr/local/go/src/golang.org/x/tools/cmd/oracle (from $GOROOT)
	/Users/name/Documents/Developer/Go_Workspace/src/golang.org/x/tools/cmd/oracle (from $GOPATH)

When enable -v I see :

Fetching https://golang.org/x/tools/cmd/oracle?go-get=1
Parsing meta tags from https://golang.org/x/tools/cmd/oracle?go-get=1 (status code 200)
get "golang.org/x/tools/cmd/oracle": found meta tag main.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at https://golang.org/x/tools/cmd/oracle?go-get=1
get "golang.org/x/tools/cmd/oracle": verifying non-authoritative meta tag
Fetching https://golang.org/x/tools?go-get=1
Parsing meta tags from https://golang.org/x/tools?go-get=1 (status code 200)
golang.org/x/tools (download)
package golang.org/x/tools/cmd/oracle: cannot find package "golang.org/x/tools/cmd/oracle" in any of:
	/usr/local/go/src/golang.org/x/tools/cmd/oracle (from $GOROOT)
	/Users/name/Documents/Developer/Go_Workspace/src/golang.org/x/tools/cmd/oracle (from $GOPATH)

Here is my .bash_profile

1 PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin
  2 export GOPATH=$HOME/Documents/Developer/Go_Workspace
  3 export PATH=$PATH:/usr/local/go/bin
  4 export PATH=$PATH:$GOPATH/bin

Can you help me with this? What did I mess up?

I am running on bash terminal on a MacOS.

答案1

得分: 8

你正在尝试安装一个已弃用的库。oracle已被guru取代,并于2016年10月1日被删除。

https://golang.org/s/using-guru

英文:

You are trying to install a deprecated library. oracle has been superseded by guru and was deleted on 1 oct 2016.

https://golang.org/s/using-guru

huangapple
  • 本文由 发表于 2016年11月6日 07:13:41
  • 转载请务必保留本文链接:https://go.coder-hub.com/40444260.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定