go get报错unrecognized import path “golang.org/x/net/context”…

今天安装gin框架,首先下载gin,命令如下:
go get github.com/mattn/go-sqlite3

结果报错:

package golang.org/x/net/context: unrecognized import path "golang.org/x/net/context" (https fetch: Get https://golang.org/x/net/context?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.)

操作的办法就是:

?


1

2

3

4

$mkdir -p $GOPATH/src/golang.org/x/

$cd $GOPATH/src/golang.org/x/

$git clone https://github.com/golang/net.git net

$go install net

安装了这个net包,然后再去安装go-sqlite3,就安装成功了。

时间: 2024-11-03 19:46:04

go get报错unrecognized import path “golang.org/x/net/context”…的相关文章

golang程序编译时提示“package runtime: unrecognized import path "runtime" (import path does not begin with hostname)”

在编译golang的工程时提示错误的, 提示的错误信息如下: package bytes: unrecognized import path "bytes" (import path does not begin with hostname) package encoding/json: unrecognized import path "encoding/json" (import path does not begin with hostname) packag

Oracle 11g安装报错Environment variable: "PATH"

Environment variable: "PATH" - This test checks whether the length of the environment variable "PATH" does not exceed the recommended length.预期值 : 1023实际值 : 1245 PRVF-3929 : Adding the Oracle binary location to the PATH environment var

CentOS重新加载网卡报错 Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/23

重新加载网卡时出现的错误如下: 1 [[email protected] dev]# service network restart 2 Shutting down interface eth0: Device state: 3 (disconnected) 3 [ OK ] 4 Shutting down interface eth1: [ OK ] 5 Shutting down interface eth2: Device state: 3 (disconnected) 6 [ OK ]

解决Appium报错cannot import name 'InvalidArgumentException'

好久没动代码,今天运行自动化脚本时突然报错 cannot import name 'InvalidArgumentException', 在CMD的python命令行下运行了下: from appium import webdriver   结果报上述错误,可见是引用错误. 百度了下,已解决. https://www.cnblogs.com/xingkeke/p/9692145.html,感谢博主分享 在python的安装目录中找到 exceptions.py 文件, 如我的目录是 D:\py\

Go get unrecognized import path "gopkg.in/yaml.v2"

安装gin: go get -u github.com/gin-gonic/gin 出现错误: package gopkg.in/yaml.v2: unrecognized import path "gopkg.in/yaml.v2" (https fetch: Get https://gopkg.in/yaml.v2?go-get=1: net/http: TLS handshake timeout) 如图所示: 尝试使用网上的解决方式: 1: git config --global

pip下载报错cannot import name 'FormatControl'

今天在pycharm中通过pip install下载插件时,不知道什么原因出了错 解决方法:降低了pip的版本 pip下载地址:https://pypi.org/project/pip/19.1.1/#files 下载后解压,并进入解压后的文件 输入 python setup.py install 之后pip成功降级,错误也解决了 pip下载报错cannot import name 'FormatControl' 原文地址:https://www.cnblogs.com/liujinxin123

sqlplus连接数据库报错SP2-0642: SQL*Plus internal error state 2130, context 0:0:0解决

sqlplus连接数据库报错SP2-0642: SQL*Plus internal error state 2130, context 0:0:0解决 sqlplus 连接数据库报错SP2-0642: SQL*Plus internal error state 2130, context 0:0:0 问题描述: 使用sqlplus客户端登录数据库,报错SP2-0642,而使用其它方式plsql或者tnsnames等方式连接数据库均没有问题 [plain] [[email protected] ~

Maven中日志jar包冲突报错:Class path contains multiple SLF4J bindings

错误表现: SLF4J: Class path contains multiple SLF4J bindings.SLF4J: Found binding in [jar:file:/D:/learn/Java/maven/repository_taotao/org/slf4j/slf4j-log4j12/1.6.4/slf4j-log4j12-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]SLF4J: Found binding in [

部署Maven项目到tomcat报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

问题:tomcat启动报错 严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener 问题背景: 工程为maven工程,ContextLoaderListener类位于spring-web-3.1.0.RELEASE.jar包中.检查了maven的pom.xml,依赖引入正常.在工程Maven Dependencies视图中也能看到spring