dqxz96998
2017-09-18 18:56
浏览 34
已采纳

无法在macOS Sierra上的Gogland 1.0 EAP中启动调试

I've switched to Go not so long ago. I've chosen JetBrains Gogland as IDE. I like both: Go and IDE, except a one issue. I don't know whether it is an issue with IDE or with Go lang configuration on macOS Sierra. But when I'm trying start debuging for a test from Gogland, the build fails with message:

GOROOT=/usr/local/go
GOPATH=/Users/username/project/go
/usr/local/go/bin/go test -c -i -o /private/var/folders/3b/hlrss45s1p93cgtq9xgsw4gh0000gn/T/All_in__bitbucket_org_ username_package_matrix_go -gcflags "-N -l" -a bitbucket.org/usaername/package/matrix
go install runtime/internal/sys: open /usr/local/go/pkg/darwin_amd64/runtime/internal/sys.a: permission denied

I use Go 1.9

$ go version
go version go1.9 darwin/amd64
$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/azagretdinov/project/go"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.9/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.9/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/3b/hlrss45s1p93cgtq9xgsw4gh0000gn/T/go-build006508560=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

Information about Gogland

Gogland (1.0 Preview) 1.0 EAP
Build #GO-172.3757.46, built on August 11, 2017
Gogland EAP User
Expiration date: November 9, 2017
JRE: 1.8.0_152-release-915-b10 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.12.6

图片转代码服务由CSDN问答提供 功能建议

不久前我切换到了Go。 我选择了JetBrains Gogland作为IDE。 我都喜欢:Go和IDE,只有一个问题除外。 我不知道这是IDE还是macOS Sierra上的Go lang配置问题。 但是,当我尝试开始从Gogland调试测试时,构建失败并显示以下消息:

  GOROOT = / usr / local / go 
GOPATH = / Users / username /  project / go 
 / usr / local / go / bin / go测试-c -i -o / private / var / folders / 3b / hlrss45s1p93cgtq9xgsw4gh0000gn / T / All_in__bitbucket_org_ username_package_matrix_go -gcflags“ -N -l” -a bitbucket.org  / usaername / package / matrix 
go安装运行时/ internal / sys:打开/usr/local/go/pkg/darwin_amd64/runtime/internal/sys.a:权限被拒绝
   
 \  n 

我使用Go 1.9

  $ go版本
go版本go1.9 darwin / amd64 
 $ go env 
GOARCH =“ amd64” 
GOBIN =“”  
GOEXE = “” 
GOHOSTARCH = “AMD64” 
GOHOSTOS = “达尔文” 
GOOS = “达尔文” 
GOPATH = “/用户/ azagretdinov /项目/去” 
GORACE = “” 
GOROOT =“在/ usr /本地/  Cellar / go / 1.9 / libexec“ 
GOTOOLDIR =” / usr / local / Cellar / go / 1.9 / libexec / pkg / tool / darwin_amd64“ 
GCCGO =” gccgo“ 
CC =” clang“ 
GOGCCFLAGS =”-fPIC-  m64 -pthread -fno-插入符诊断-Qunused参数-fmessage-length = 0 -fdebug-prefix-map = / var / folders / 3b / hlrss4  5s1p93cgtq9xgsw4gh0000gn / T / go-build006508560 = / tmp / go-build -gno-record-gcc-switches -fno-common“ 
CXX =” clang ++“ 
CGO_ENABLED =” 1“ 
CGO_CFLAGS =”-g -O2“ 
CGO_CPPFLAGS  =“” 
CGO_CXXFLAGS =“-g -O2” 
CGO_FFLAGS =“-g -O2” 
CGO_LDFLAGS =“-g -O2” 
PKG_CONFIG =“ pkg-config” 
   
  
 

关于Gogland的信息

  Gogland(1.0预览版)1.0 EAP 
Build#GO-172.3757.46,建于2017年8月11日
Gogland EAP用户
到期 日期:2017年11月9日
JRE:1.8.0_152-release-915-b10 x86_64 
JVM:JetBrains sro的OpenJDK 64位服务器VM 
Mac OS X 10.12.6 
   
  
  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

相关推荐 更多相似问题