The Go Programming Language
› http://golang.org/
› Go Playground
Go Projects
› Revel Web Framework
hbolive

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

  •  
  •   hbolive · Jan 13, 2021 · 2162 views
    This topic created in 2120 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
    whitehack
    Jan 13, 2021
    1
    go env -w GOPROXY=https://goproxy.cn,direct
    whitehack
    whitehack
    Jan 13, 2021
    2
    还要关闭 sum
    go env -w GOSUMDB=off

    或者用国内地址

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

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

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

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