【数据库连接】连接sqlite3报错:go-sqlite3 requires cgo to work. This is a stub

报错信息

powershell 复制代码
register db Ping default, Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub

Windows解决办法

新建环境变量

新报错

powershell 复制代码
Failed to build the application: # runtime/cgo
cgo: C compiler "gcc" not found: exec: "gcc": executable file not found in %PATH%

安装GCC

官网:https://gitcode.com/mattn/go-sqlite3/tree/master?utm_source=csdn_github_accelerator\&isLogin=1

下载

安装



这样就可以解决了!

相关推荐
SilentSamsara21 小时前
向量数据库实战:Chroma/Milvus/Qdrant 选型与语义搜索应用
开发语言·数据库·人工智能·python·青少年编程·milvus
沪漂阿龙21 小时前
LangChain 系列之Agent:从固定流程到模型自主决策
服务器·数据库·langchain
青春喂了后端21 小时前
Go Sidecar Status 性能优化
开发语言·性能优化·golang
zh_xuan21 小时前
PC端操作SQLite数据库
数据库·c++·sqlite
MXsoft61821 小时前
**采集节点主备模:保障监控系统自身高可用**
数据库
winfredzhang21 小时前
用 wxPython + 通义千问 VL 打造一款“批量人物图像识别“桌面应用
python·sqlite·wxpython·qwen 3.7max·分析照片
A__tao1 天前
告别手写 Go 结构体!推荐一个支持注释解析的 YAML 转 Struct 在线工具
开发语言·后端·golang
何以解忧,唯有..1 天前
Go 语言语句分隔符详解:分号、换行与代码规范
开发语言·golang·代码规范
yyuuuzz1 天前
独立站运营的几个技术层面常见问题
大数据·运维·服务器·网络·数据库·aws
IT策士1 天前
Redis 从入门到精通:Redis Stream —— 可靠消息队列
数据库·redis·缓存