英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论