V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
The Go Programming Language
http://golang.org/
Go Playground
Go Projects
Revel Web Framework
hbolive

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

  •  
  •   hbolive · Jan 13, 2021 · 1667 views
    This topic created in 1934 days ago, the information mentioned may be changed or developed.
    已经设置了代理 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 replies    2021-01-13 20:05:18 +08:00
    whitehack
        1
    whitehack  
       Jan 13, 2021
    go env -w GOPROXY=https://goproxy.cn,direct
    whitehack
        2
    whitehack  
       Jan 13, 2021
    还要关闭 sum
    go env -w GOSUMDB=off

    或者用国内地址

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

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

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

    git config --global --unset http.proxy
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1250 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 17:07 · PVG 01:07 · LAX 10:07 · JFK 13:07
    ♥ Do have faith in what you're doing.