连接sqlite3报错:go-sqlite3 requires cgo to work. This is a stub

这篇具有很好参考价值的文章主要介绍了连接sqlite3报错:go-sqlite3 requires cgo to work. This is a stub。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

报错信息:

register db Ping default, Binary was compiled with ‘CGO_ENABLED=0’, go-sqlite3 requires cgo to work. This is a stub

Windows解决办法

1. 新建环境变量

binary was compiled with 'cgo_enabled=0', go-sqlite3 requires cgo to work. t,WEB,软件编程,1024程序员节

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部分

binary was compiled with 'cgo_enabled=0', go-sqlite3 requires cgo to work. t,WEB,软件编程,1024程序员节

3.2 点击下载链接

binary was compiled with 'cgo_enabled=0', go-sqlite3 requires cgo to work. t,WEB,软件编程,1024程序员节

3.3 按自己喜好下载一个

binary was compiled with 'cgo_enabled=0', go-sqlite3 requires cgo to work. t,WEB,软件编程,1024程序员节

3.4 安装

binary was compiled with 'cgo_enabled=0', go-sqlite3 requires cgo to work. t,WEB,软件编程,1024程序员节
binary was compiled with 'cgo_enabled=0', go-sqlite3 requires cgo to work. t,WEB,软件编程,1024程序员节
binary was compiled with 'cgo_enabled=0', go-sqlite3 requires cgo to work. t,WEB,软件编程,1024程序员节

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

binary was compiled with 'cgo_enabled=0', go-sqlite3 requires cgo to work. t,WEB,软件编程,1024程序员节文章来源地址https://www.toymoban.com/news/detail-777688.html

到了这里,关于连接sqlite3报错:go-sqlite3 requires cgo to work. This is a stub的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • springboot引入sqlite3,mybaits自动生成器连接sqlite

    1, pom文件里添加依赖 2,yml文件引入sqlite数据库 3,在generator.properties引入sqlite 4,运行Generator即可生成

    2024年01月23日
    浏览(35)
  • sqlite3.OperationalError: unable to open database file解决方法

    执行superset时,提示该错误:sqlite3.OperationalError: unable to open database file 由于superset里使用django设置sqlite3数据库。 应该属于django设置sqlite3数据库的问题: OperationalError: unable to open database file 原因 1:数据库路改成绝对路径,并且目录要存在 2:数据库会自动建立,之前自己多此

    2024年02月11日
    浏览(29)
  • 【Django-Docker】Sqlite3.db读取权限不够attempt to write a readonly database-20220803

    参考:https://blog.csdn.net/m0_46629123/article/details/126133006 OperationalError at /user_login/ attempt to write a readonly database 1.通过django项目的settings.py可以看到关联数据库文件名称 … DATABASES = { ‘default’: { ‘ENGINE’: ‘django.db.backends.sqlite3’, ‘NAME’: os.path.join(BASE_DIR, ‘db.sqlite3’), } } … 2.将

    2024年02月07日
    浏览(35)
  • 部署Django报错-requires SQLite 3.8.3 or higher

    在部署测试环境时,有需要用到一个python的后端服务,要部署到测试环境中去 心想这不是so easy吗,把本地调试时使用的python版本及Django版本在服务器上对应下载好,然后直接执行命令 不就完事儿了吗,说干就干,立马去服务器布置好python和django的环境,到py项目的根目录下

    2024年02月10日
    浏览(34)
  • Python数据库模块(sqlite3,SQLite3)

    创建数据库:在控制台sqlite3 name sqlite3.connect(database [,timeout ,other optional arguments]) 打开数据库;如果指数据库存在则返回一个连接对象,如果不存在则会创建一个数据库; connection.cursor() 创建一个cursor; cursor.execute(sql) 执行一个sql语句,该语句可以被参数化; connection.execut

    2024年03月19日
    浏览(43)
  • 【Sqlite3】maraidb和sqlite3部分命令操作区别

    maraidb和sqlite3部分命令操作区别记录 在实现我的视频点播系统项目时,我尝试封装了两种数据库的调用逻辑 mysql(maraidb) sqlite3 这里封装sqlite3的原因是,sqlite3主要针对的就是 嵌入式 数据库,其性能可能不如mysql,但是就好在可以 带着走 。安装也很方便,内存占用相对于

    2024年02月09日
    浏览(42)
  • 【sqlite3】sqlite3在linux下使用sqlitebrowser工具实现数据可视化

    1. ### install sqlitebrowser 安装指令 通过工具打开数据库 打开效果

    2024年02月01日
    浏览(34)
  • 02.sqlite3学习——嵌入式数据库的基本要求和SQLite3的安装

    目录 嵌入式数据库的基本要求和SQLite3的安装 嵌入式数据库的基本要求 常见嵌入式数据库 sqlite3简介 SQLite3编程接口模型 ubuntu 22.04下的SQLite安装 (1)安装SQLite3软件 sudo apt-get install sqlite3 (2)安装库文件 sudo apt-get install libsqlite3-dev 安装成功后输入sqlite3查看 (3)安装sqlite3可

    2024年02月11日
    浏览(57)
  • 解决Django报错 raise ImproperlyConfigured(‘SQLite 3.8.3 or later is required (found %s).‘ % Database.s

    运行 python3 manage.py runserver   会产生了如下的错误输出信息如下: [root@localhost mysite]# python3 manage.py runserver Watching for file changes with StatReloader Exception in thread django-main-thread: Traceback (most recent call last):   File \\\"/usr/lib64/python3.6/threading.py\\\", line 916, in _bootstrap_inner     self.run()   File

    2023年04月17日
    浏览(32)
  • golang 记录交叉编译sqlite的报错信息 go build -ldflags

    go build -ldflags ‘-s -w --extldflags “-static -fpic”’ -o go-web main.go command-line-arguments /tmp/go-link-1199555067/000015.o: In function ‘unixDlOpen’: /root/go/pkg/mod/github.com/mattn/go-sqlite3@v1.14.6/sqlite3-binding.c:40175: warning: Using ‘dlopen’ in statically linked applications requires at runtime the shared libraries from the gl

    2024年02月04日
    浏览(33)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包