使用如下方式安装beego的时候出错gogetgithub.com/astaxie/beego错误信息:goinstallunicode/utf8:open/opt/go/pkg/linux_amd64/unicode/utf8.a:permissiondeniedgoinstallunicode:open/opt/go/pkg/linux_amd64/unicode.a:permissiondeniedgoinstallmath:open/opt/go/pkg/linux_amd64/math.a:permissiondeniedgoinstallsort:open/opt/go/pkg/linux_amd64/sort.a:permissiondeniedgoinstallhash:open/opt/go/pkg/linux_amd64/hash.a:permissiondeniedgoinstallunicode/utf16:open/opt/go/pkg/linux_amd64/unicode/utf16.a:permissiondeniedgoinstallcrypto/subtle:open/opt/go/pkg/linux_amd64/crypto/subtle.a:permissiondeniedgoinstallcontainer/list:open/opt/go/pkg/linux_amd64/container/list.a:permissiondeniedgoinstallinternal/syscall:open/opt/go/pkg/linux_amd64/internal/syscall.a:permissiondeniedgoinstalltime:open/opt/go/pkg/linux_amd64/time.a:permissiondenied然后我在命令前加了一个sudo,然后提示go:cannotfindGOROOTdirectory:/usr/local/go我的golang环境配置如下:GOARCH="amd64"GOBIN="/opt/go/bin"GOCHAR="6"GOEXE=""GOHOSTARCH="amd64"GOHOSTOS="linux"GOOS="linux"GOPATH="/home/buchenglei/workspace/golang"GORACE=""GOROOT="/opt/go"GOTOOLDIR="/opt/go/pkg/tool/linux_amd64"CC="gcc"GOGCCFLAGS="-fPIC-m64-pthread-fmessage-length=0"CXX="g++"CGO_ENABLED="1"该怎么解决呢?
慕村9548890
相关分类