# __ .______ __ __ .______ .___________. ______ ______ .___ ___. # | | | _ \ | | | | | _ \ | | / | / __ \ | \/ | # | | | |_) | | |__| | | |_) | `---| |----` | ,----'| | | | | \ / | # | | | ___/ | __ | | ___/ | | | | | | | | | |\/| | # | | | | | | | | | | | | __ | `----.| `--' | | | | | # |__| | _| |__| |__| | _| |__| (__) \______| \______/ |__| |__| # ""$o o$"" ""$o o$" o "$""""o "o $" o""" $" "$o "$o" $o " $ o$" "$o $$$o$$$$o$$$$ $" "oooo o "" ""$$$$$$$$""o"" oo oooo" "$$$$$$oo"oo$$$o" o$$$$oo" o$$$o "o$$$$$$$ "$ $$$$$$$$$oo o$$$$$$$$$o"$" $ $$$ $$$$$$ o$$$$$$ "$$o"o $ $$$$o $$$$$$ $$$$$$$ $$$$o"o $ $$$$$ $$$$$" "$$$$$ $$$$$$ $ $o""""" """" """ """"""$" $ o$$$$$"""$$$$$"$$$$$""$$$$$ooo"o $ o"$o $$$$$$$$oo$$$$$$$$o $$"" $ oo$ "$$$$$$$$$$$$$$$$$$$$" o" o $oo o$$$"$ $$o"o $$$$$$$"" "$$$$$$$ o$$ $$$$o IPHPT BUG o$$$$" $ $$$$ o "$$$$$oo o$$$$$$ "o$$$$ $ $$$$$ o$$"" $ $$$$$o" "$$$$$$$$$$$$$ o o$$$$$o$ "" $$ $$" $ $$$" o"o$$$$$$$$$$$$ " "$$$ $ $$o o$$ "o $$ " $$$$$$$$$$$"o "$$ $ $$$ $$$ oo$ $ o""$$""$$$o " $"o$o $$$o o$$$$ o$$$"o"$oo$$$$o" o $o $$$$$oo$ $$$$o $$$$ $$$$ $$$$" $ $$$$$"" $$ o$$$ """$$$$"o" "$$$o "$$$o $$$" o """ $ $$$oo $$$$o" $$ o$$$"o" """"$ o$$$ o$" $$$ $ "$"" o$"o"$$o$$$$ "$$"o" o$$ "$oo $ " $$o $ "oo$"o$$$"o$o"$$$$o" o" $$$ ""$o $$ $$$o "o$$o$"$$"$$o$$o$$"$$o" $$$ ""o $$$ ""$$$ $$$$$$ $$$$ $" $$$$ $$ $$$$ $$$$"$$$o$ $"" $$$ $$$$ "$$$ """ $$$$ $$"" "$$ oo$" $ooo $ "$$ glide update 报错   -  叶落山城秋

glide update 报错

Error scanning google.golang.org/grpc/metadata: cannot find package "." in:
	/Users/zhu/.glide/cache/src/https-google.golang.org-grpc-metadata
	
[WARN]	Unable to checkout golang.org/x/sys/unix
[WARN]	Error updating golang.org/x/sys/unix: Cannot detect VCS
[INFO]	--> Fetching updates for github.com/mitchellh/go-homedir
[WARN]	Download failed.
[WARN]	Error updating github.com/mitchellh/go-homedir: Unable to update repository: exit status 128
[INFO]	--> Fetching updates for github.com/armon/go-metrics
[ERROR]	Error scanning google.golang.org/appengine/cloudsql: cannot find package "." in:
	/Users/zhu/.glide/cache/src/https-google.golang.org-appengine-cloudsql
[INFO]	--> Fetching updates for github.com/modern-go/concurrent
[INFO]	--> Fetching updates for github.com/modern-go/reflect2
[ERROR]	Error scanning golang.org/x/sys/unix: cannot find package "." in:
	/Users/zhu/.glide/cache/src/https-golang.org-x-sys-unix
[INFO]	--> Fetching updates for github.com/hashicorp/go-immutable-radix
[WARN]	Download failed.
[WARN]	Error updating github.com/hashicorp/go-immutable-radix: Unable to update repository: exit status 128
[INFO]	--> Fetching updates for github.com/hashicorp/golang-lru
[ERROR]	Failed to retrieve a list of dependencies: Error resolving imports	
	

其实就是 没有翻墙,访问不到 google.golang.org

最好的方式就是 设置代理!

然后用 shadowsock 设置 HTTP代理

里面设置

HTTP代理 监听地址:127.0.0.1
HTTP代理 监听端口:1088

(端口你可以自己设置!)

然后开启shadowsocks

然后到你所在的那个终端里

export http_proxy='http://localhost:1088'
export https_proxy='http://localhost:1088'

然后在执行

glide up -v

就可以了!

如果想要取消终端代理

unset http_proxy
unset https_proxy

如果想要一直生效

vim ~/.bash_profile

export http_proxy='http://localhost:1088'
export https_proxy='http://localhost:1088'

然后就可以了!

PS:劳资终于能拉下包了


欢迎转载,但请附上原文地址哦,尊重原创,谢谢大家 本文地址: https://www.iphpt.com/detail/119/
本站(PHP --> Golang)已重构,代码开源

当你能力不能满足你的野心的时候,你就该沉下心来学习