V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
The Go Programming Language
http://golang.org/
Go Playground
Go Projects
Revel Web Framework
hbolive
V2EX  ›  Go 编程语言

安装 colly 框架失败,难道真要翻墙才行吗?

  •  
  •   hbolive · 2021-01-13 16:06:04 +08:00 · 735 次点击
    这是一个创建于 1170 天前的主题,其中的信息可能已经有所发展或是发生改变。
    已经设置了代理 set GOPROXY=https://goproxy.cn
    执行:go get -u github.com/gocolly/colly/
    错误提示:
    unrecognized import path "golang.org/x/net/html": https fetch: Get "https://golang.org/x/net/html?go-get=1": dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

    下面还有 2 个错误也差不多。
    9 条回复    2021-01-13 20:05:18 +08:00
    whitehack
        1
    whitehack  
       2021-01-13 16:11:52 +08:00
    go env -w GOPROXY=https://goproxy.cn,direct
    whitehack
        2
    whitehack  
       2021-01-13 16:13:02 +08:00
    还要关闭 sum
    go env -w GOSUMDB=off

    或者用国内地址

    go env -w GOSUMDB="sum.golang.google.cn"
    hbolive
        3
    hbolive  
    OP
       2021-01-13 17:03:21 +08:00
    @whitehack 谢谢,你说的方法都试了,但还是不行。。
    hzz2
        4
    hzz2  
       2021-01-13 18:24:50 +08:00
    直接按 https://goproxy.cn 这上面的说明试过还是失败?
    bruce0
        5
    bruce0  
       2021-01-13 18:42:46 +08:00
    我前两天也是这样 我用的鹏博士的宽带(最烂的,没有之一)

    我用过两个代理 https://goproxy.cnhttps://goproxy.io

    多试了几次 后来反正安上了 具体是用那个按上的 我也不清楚了
    jingniao
        6
    jingniao  
       2021-01-13 18:42:56 +08:00 via Android
    go11module on
    guochao
        7
    guochao  
       2021-01-13 19:56:35 +08:00
    看看```go env```输出,还有 go 版本。怀疑你是用了老版本
    dimlau
        8
    dimlau  
       2021-01-13 20:04:53 +08:00
    git config --global http.proxy "localhost:1234"
    dimlau
        9
    dimlau  
       2021-01-13 20:05:18 +08:00
    复位:

    git config --global --unset http.proxy
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1686 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 16:45 · PVG 00:45 · LAX 09:45 · JFK 12:45
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.