【数据库连接】连接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

下载

安装



这样就可以解决了!

相关推荐
广州智造1 小时前
OptiStruct实例:3D实体转子分析
数据库·人工智能·算法·机器学习·数学建模·3d·性能优化
技术宝哥4 小时前
Redis(2):Redis + Lua为什么可以实现原子性
数据库·redis·lua
学地理的小胖砸6 小时前
【Python 操作 MySQL 数据库】
数据库·python·mysql
dddaidai1236 小时前
Redis解析
数据库·redis·缓存
数据库幼崽6 小时前
MySQL 8.0 OCP 1Z0-908 121-130题
数据库·mysql·ocp
Amctwd6 小时前
【SQL】如何在 SQL 中统计结构化字符串的特征频率
数据库·sql
betazhou7 小时前
基于Linux环境实现Oracle goldengate远程抽取MySQL同步数据到MySQL
linux·数据库·mysql·oracle·ogg
{⌐■_■}7 小时前
【go】binary包,大小端理解,read,write使用,自实现TCP封包拆包案例
arm开发·tcp/ip·golang
lyrhhhhhhhh7 小时前
Spring 框架 JDBC 模板技术详解
java·数据库·spring
喝醉的小喵9 小时前
【mysql】并发 Insert 的死锁问题 第二弹
数据库·后端·mysql·死锁