我尝试使用以下命令在我的 Ubuntu 机器上安装 Oracle:
go get golang.org/x/tools/cmd/oracle
但我收到以下错误:
#golang.org/x/tools/cmd/oracle /home/rr/Proj/go/src/golang.org/x/tools/container/intsets/sparse.go:140: error: undefined reference to 'golang.org_x_tools_container_intsets.popcount' /home/rr/Proj/go/src/golang.org/x/tools/container/intsets/util.go:51: error: undefined reference to 'golang.org_x_tools_container_intsets.popcount' collect2: error: ld returned 1 exit status
我的Go版本是
go version xgcc (Ubuntu 4.9.1-0ubuntu1) 4.9.1 linux/amd64
还有其他人遇到同样的问题吗?
请您参考如下方法:
似乎我们需要删除 gcc-go(使用 apt-get 安装)并从网站安装 Go https://golang.org/ .这解决了这个问题。






