连接sqlite3报错:go-sqlite3 requires cgo to work. This is a stub
•
后端
连接sqlite3报错:go-sqlite3 requires cgo to work. This is a stub
- 报错信息:
- Windows解决办法
-
- 1. 新建环境变量
- 2. 出现新的报错
- 3. 安装GCC
-
- 3.1 进入Sqlite3官网
- 3.2 找到Windows部分
- 3.2 点击下载链接
- 3.3 按自己喜好下载一个
- 3.4 安装
- 到这里就成功解决了!!!
报错信息:
register db Ping default, Binary was compiled with ‘CGO_ENABLED=0’, go-sqlite3 requires cgo to work. This is a stub
Windows解决办法
1. 新建环境变量

2. 出现新的报错
报错信息:
Failed to build the application: # runtime/cgo
cgo: C compiler “gcc” not found: exec: “gcc”: executable file not found in %PATH%
3. 安装GCC
3.1 进入Sqlite3官网
- github
3.2 找到Windows部分

3.2 点击下载链接

3.3 按自己喜好下载一个

3.4 安装



到这里就成功解决了!!!

本文来自网络,不代表协通编程立场,如若转载,请注明出处:https://www.net2asp.com/8ef4efbe38.html
