报错信息:
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.toymoban.com/news/detail-777688.html
到这里就成功解决了!!!
文章来源地址https://www.toymoban.com/news/detail-777688.html
到了这里,关于连接sqlite3报错:go-sqlite3 requires cgo to work. This is a stub的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!