手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜的Vultr , 注册 | 登陆

brew upgrade不能升级go 1.5.1的解决方案

首页 > 苹果相关 >

 在brew upgrade的时候,出错信息如下:

XML/HTML代码
  1. brew upgrade  
  2. ==> Upgrading 1 outdated package, with result:  
  3. go 1.5.1  
  4. ==> Upgrading go  
  5. ==> Downloading https://storage.googleapis.com/golang/go1.5.1.src.tar.gz  
  6. Already downloaded: /Library/Caches/Homebrew/go-1.5.1.tar.gz  
  7. ==> Downloading https://storage.googleapis.com/golang/go1.4.2.darwin-amd64-osx10.8.tar.gz  
  8. Already downloaded: /Library/Caches/Homebrew/go--gobootstrap-10.8.tar.gz  
  9. ==> ./make.bash --no-clean  
  10. ==> ./make.bash --no-clean  
  11. ==> Cloning https://go.googlesource.com/tools.git  
  12. Cloning into '/Library/Caches/Homebrew/go--gotools--git'...  
  13. fatal: unable to access 'https://go.googlesource.com/tools.git/': Failed to connect to go.googlesource.com port 443: Operation timed out  
  14. Error: Failed to download resource "go--gotools"  
  15. Failure while executing: git clone https://go.googlesource.com/tools.git /Library/Caches/Homebrew/go--gotools--git  
于是我想到,可以使用proxychains4来进行访问(之前已经安装 goagentx + cow [with shadowsocks] ),然而:
XML/HTML代码
  1. proxychains4 brew upgrade  
  2. [proxychains] config file found: /usr/local/Cellar/proxychains-ng/4.10/etc/proxychains.conf  
  3. [proxychains] preloading /usr/local/Cellar/proxychains-ng/4.10/lib/libproxychains4.dylib  
  4. ==> Upgrading 1 outdated package, with result:  
  5. go 1.5.1  
  6. ==> Upgrading go  
  7. ==> Downloading https://storage.googleapis.com/golang/go1.5.1.src.tar.gz  
  8. Already downloaded: /Library/Caches/Homebrew/go-1.5.1.tar.gz  
  9. ==> Downloading https://storage.googleapis.com/golang/go1.4.2.darwin-amd64-osx10.8.tar.gz  
  10. Already downloaded: /Library/Caches/Homebrew/go--gobootstrap-10.8.tar.gz  
  11. ==> ./make.bash --no-clean  
  12. Last 15 lines from /Users/xiaojianliang/Library/Logs/Homebrew/go/01.make.bash:  
  13. text/template  
  14. go/doc  
  15. go/build  
  16. cmd/go  
  17. fatal error: runtime: bsdthread_register error (unset DYLD_INSERT_LIBRARIES)  
  18.   
  19. runtime stack:  
  20. runtime.throw(0x3e9855)  
  21.     /usr/local/go/src/runtime/panic.go:491 +0xad fp=0x7fff5fbff390 sp=0x7fff5fbff360  
  22. runtime.goenvs()  
  23.     /usr/local/go/src/runtime/os_darwin.c:103 +0x60 fp=0x7fff5fbff3a8 sp=0x7fff5fbff390  
  24. runtime.schedinit()  
  25.     /usr/local/go/src/runtime/proc.c:141 +0x5f fp=0x7fff5fbff3d0 sp=0x7fff5fbff3a8  
  26. runtime.rt0_go(0x7fff5fbff408, 0x4, 0x7fff5fbff408, 0x0, 0x0, 0x4, 0x7fff5fbff670, 0x7fff5fbff6c6, 0x7fff5fbff6cc, 0x7fff5fbff6cf, ...)  
  27.     /usr/local/go/src/runtime/asm_amd64.s:95 +0x116 fp=0x7fff5fbff3d8 sp=0x7fff5fbff3d0  
  28.   
  29. READ THIS: https://git.io/brew-troubleshooting  
  30.   
  31. These open issues may also help:  
  32. Homebrew goes ahead with installation after warning dev tools aren't installed https://github.com/Homebrew/homebrew/issues/19580  
这回倒好,还没有到git clone,就直接出错了。看来proxychains和golang不兼容,怎么办?于是干脆我直接先clone一下看看:
XML/HTML代码
  1. :~$ proxychains4 git clone https://go.googlesource.com/tools.git /Library/Caches/Homebrew/go--gotools--git  
  2. [proxychains] config file found: /usr/local/Cellar/proxychains-ng/4.10/etc/proxychains.conf  
  3. [proxychains] preloading /usr/local/Cellar/proxychains-ng/4.10/lib/libproxychains4.dylib  
  4. Cloning into '/Library/Caches/Homebrew/go--gotools--git'...  
  5. remote: Counting objects: 827, done  
  6. remote: Finding sources: 100% (12/12)  
  7. remote: Total 14355 (delta 9764), reused 14348 (delta 9764)  
  8. Receiving objects: 100% (14355/14355), 8.98 MiB | 119.00 KiB/s, done.  
  9. Resolving deltas: 100% (9764/9764), done.  
  10. Checking connectivity... done.  
果然OK了。那么我再直接试一下upgrade吧?
XML/HTML代码
  1. brew upgrade  
  2. ==> Upgrading 1 outdated package, with result:  
  3. go 1.5.1  
  4. ==> Upgrading go  
  5. ==> Downloading https://storage.googleapis.com/golang/go1.5.1.src.tar.gz  
  6. Already downloaded: /Library/Caches/Homebrew/go-1.5.1.tar.gz  
  7. ==> Downloading https://storage.googleapis.com/golang/go1.4.2.darwin-amd64-osx10.8.tar.gz  
  8. Already downloaded: /Library/Caches/Homebrew/go--gobootstrap-10.8.tar.gz  
  9. ==> ./make.bash --no-clean  
  10. ==> ./make.bash --no-clean  
  11. ==> Cloning https://go.googlesource.com/tools.git  
  12. Updating /Library/Caches/Homebrew/go--gotools--git  
  13. ==> Checking out revision d02228d1857b9f49cd0252788516ff5584266eb6  
  14. ==> go build  
  15. ==> go build  
  16. ==> Caveats  
  17. As of go 1.2, a valid GOPATH is required to use the `go get` command:  
  18.   https://golang.org/doc/code.html#GOPATH  
  19.   
  20. You may wish to add the GOROOT-based install location to your PATH:  
  21.   export PATH=$PATH:/usr/local/opt/go/libexec/bin  
  22. ==> Summary  



本站采用创作共享版权协议, 要求署名、非商业和保持一致. 本站欢迎任何非商业应用的转载, 但须注明出自"易栈网-膘叔", 保留原始链接, 此外还必须标注原文标题和链接.

« 上一篇 | 下一篇 »

发表评论

评论内容 (必填):