使用Mac系统,编译go语言的时候,出现这个错误,请问如何解决?

zaixiankaifa 2013-04-26 12:27:26
./all.bash
# Building C bootstrap tool.
cmd/dist
ld: can't open output file for writing: cmd/dist/dist.ld_tLXq5s, errno=13 for architecture x86_64
collect2: ld returned 1 exit status


使用Mac系统,编译go语言的时候,出现这个错误,请问如何解决?
...全文
476 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
zaixiankaifa 2013-04-26
  • 打赏
  • 举报
回复
zhaomatoMacBook-Pro:users root# go Go is a tool for managing Go source code. Usage: go command [arguments] The commands are: build compile packages and dependencies clean remove object files doc run godoc on package sources env print Go environment information fix run go tool fix on packages fmt run gofmt on package sources get download and install packages and dependencies install compile and install packages and dependencies list list packages run compile and run Go program test test packages tool run specified go tool version print Go version vet run go tool vet on packages Use "go help [command]" for more information about a command. Additional help topics: gopath GOPATH environment variable packages description of package lists remote remote import path syntax testflag description of testing flags testfunc description of testing functions Use "go help [topic]" for more information about that topic. zhaomatoMacBook-Pro:users root# 设置了环境变量之后,输入go,出现以上提示,是不是已经安装成功了?
zaixiankaifa 2013-04-26
  • 打赏
  • 举报
回复
zhaomatoMacBook-Pro:src root# ./all.bash # Building C bootstrap tool. cmd/dist # Building compilers and Go bootstrap tool for host, darwin/amd64. lib9 libbio libmach misc/pprof cmd/addr2line cmd/cov cmd/nm cmd/objdump cmd/pack cmd/prof cmd/cc cmd/gc cmd/6l cmd/6a cmd/6c cmd/6g pkg/runtime pkg/errors pkg/sync/atomic pkg/sync pkg/io pkg/unicode pkg/unicode/utf8 pkg/unicode/utf16 pkg/bytes pkg/math pkg/strings pkg/strconv pkg/bufio pkg/sort pkg/container/heap pkg/encoding/base64 pkg/syscall pkg/time pkg/os pkg/reflect pkg/fmt pkg/encoding/json pkg/flag pkg/path/filepath pkg/path pkg/io/ioutil pkg/log pkg/regexp/syntax pkg/regexp pkg/go/token pkg/go/scanner pkg/go/ast pkg/go/parser pkg/os/exec pkg/net/url pkg/text/template/parse pkg/text/template pkg/go/doc pkg/go/build cmd/go # Building packages and commands for darwin/amd64. runtime errors sync/atomic unicode unicode/utf8 math unicode/utf16 crypto/subtle container/list container/ring sync image/color io syscall bytes strings hash crypto/cipher crypto hash/crc32 crypto/hmac hash/adler32 crypto/md5 crypto/sha1 path crypto/sha256 crypto/sha512 time bufio text/tabwriter html hash/crc64 hash/fnv strconv sort math/rand math/cmplx os container/heap compress/bzip2 path/filepath os/signal reflect regexp/syntax io/ioutil net/url os/exec encoding/base64 crypto/aes crypto/rc4 encoding/pem encoding/ascii85 encoding/base32 image regexp image/draw image/jpeg fmt encoding/binary debug/dwarf crypto/des index/suffixarray flag go/token text/template/parse log debug/elf debug/macho debug/pe go/scanner encoding/json encoding/xml compress/flate math/big go/ast mime text/template runtime/debug encoding/gob runtime/pprof text/scanner cmd/yacc go/doc go/parser go/printer html/template crypto/elliptic crypto/rand crypto/rsa compress/gzip crypto/dsa go/build encoding/asn1 cmd/cgo cmd/fix archive/zip cmd/gofmt cmd/vet archive/tar cmd/api compress/lzw crypto/x509/pkix compress/zlib crypto/ecdsa database/sql/driver debug/gosym encoding/csv database/sql encoding/hex image/gif image/png testing testing/iotest testing/quick runtime/cgo crypto/x509 net os/user crypto/tls net/textproto log/syslog mime/multipart net/mail net/http net/smtp cmd/go expvar net/http/pprof net/http/cgi net/http/httptest net/http/httputil net/rpc cmd/godoc net/http/fcgi net/rpc/jsonrpc # Testing packages. ok cmd/api 0.079s ? cmd/cgo [no test files] ok cmd/fix 1.382s ok cmd/go 0.099s ? cmd/godoc [no test files] ok cmd/gofmt 0.097s ? cmd/vet [no test files] ? cmd/yacc [no test files] ok archive/tar 0.035s ok archive/zip 0.131s ok bufio 0.067s ok bytes 0.097s ok compress/bzip2 0.079s ok compress/flate 0.234s ok compress/gzip 0.047s ok compress/lzw 0.148s ok compress/zlib 0.199s ok container/heap 0.130s ok container/list 0.173s ok container/ring 0.024s ? crypto [no test files] ok crypto/aes 0.053s ok crypto/cipher 0.119s ok crypto/des 0.107s ok crypto/dsa 0.158s ok crypto/ecdsa 0.135s ok crypto/elliptic 0.251s ok crypto/hmac 0.243s ok crypto/md5 0.014s ok crypto/rand 0.220s ok crypto/rc4 0.275s ok crypto/rsa 0.279s ok crypto/sha1 0.224s ok crypto/sha256 0.015s ok crypto/sha512 0.057s ok crypto/subtle 0.056s ok crypto/tls 0.119s ok crypto/x509 0.468s ? crypto/x509/pkix [no test files] ok database/sql 0.116s ok database/sql/driver 0.021s ok debug/dwarf 0.167s ok debug/elf 0.141s ok debug/gosym 0.146s ok debug/macho 0.097s ok debug/pe 0.165s ok encoding/ascii85 0.131s ok encoding/asn1 0.075s ok encoding/base32 0.021s ok encoding/base64 0.072s ok encoding/binary 0.137s ok encoding/csv 0.014s ok encoding/gob 0.118s ok encoding/hex 0.071s ok encoding/json 0.120s ok encoding/pem 0.016s ok encoding/xml 0.097s ok errors 0.160s ok expvar 0.083s ok flag 0.069s ok fmt 0.090s ok go/ast 0.045s ok go/build 0.183s ok go/doc 0.133s ok go/parser 0.078s ok go/printer 0.400s ok go/scanner 0.073s ok go/token 0.106s ? hash [no test files] ok hash/adler32 0.053s ok hash/crc32 0.014s ok hash/crc64 0.019s ok hash/fnv 0.013s ok html 0.036s ok html/template 0.341s ok image 0.155s ok image/color 0.021s ok image/draw 0.071s ? image/gif [no test files] ok image/jpeg 0.119s ok image/png 0.077s ok index/suffixarray 0.023s ok io 0.062s ok io/ioutil 0.059s ok log 0.365s ok log/syslog 0.698s ok math 0.032s ok math/big 0.161s ok math/cmplx 0.083s ok math/rand 0.153s ok mime 0.014s ok mime/multipart 0.219s --- FAIL: TestMulticastListener (0.00 seconds) multicast_test.go:69: First ListenMulticastUDP failed: joinipv6group udp ff0e::114: setsockopt: can't assign requested address FAIL FAIL net 1.128s ok net/http 2.995s ok net/http/cgi 0.979s ok net/http/fcgi 0.016s ok net/http/httptest 0.136s ok net/http/httputil 0.208s ? net/http/pprof [no test files] ok net/mail 0.009s ok net/rpc 0.117s ok net/rpc/jsonrpc 0.217s ok net/smtp 0.080s ok net/textproto 0.122s ok net/url 0.017s ok os 0.616s ok os/exec 0.794s ok os/signal 0.013s ok os/user 0.173s ok path 0.197s ok path/filepath 0.700s ok reflect 0.053s ok regexp 0.221s ok regexp/syntax 0.733s ok runtime 0.341s ? runtime/cgo [no test files] ok runtime/debug 0.171s ok runtime/pprof 0.450s ok sort 0.091s ok strconv 0.464s ok strings 0.050s ok sync 0.090s ok sync/atomic 0.045s ? syscall [no test files] ? testing [no test files] ? testing/iotest [no test files] ok testing/quick 0.041s ok text/scanner 0.018s ok text/tabwriter 0.030s ok text/template 0.074s ok text/template/parse 0.063s ok time 2.253s ok unicode 0.014s ok unicode/utf16 0.012s ok unicode/utf8 0.054s ? unsafe [no test files] zhaomatoMacBook-Pro:src root# 改用root账户之后,还是无法安装,不知道什么原因,麻烦高手指导一下
fdl19881 2013-04-26
  • 打赏
  • 举报
回复
13表示EACCES , Permission denied 所以使用root权限吧,

18,773

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 专题技术讨论区
社区管理员
  • 专题技术讨论区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧