gpt4 book ai didi

ubuntu - 在 Ubuntu 上安装 sqlite3 gem 时出错

转载 作者:太空宇宙 更新时间:2023-11-03 17:01:53 25 4
gpt4 key购买 nike

我正在尝试在 Ubuntu 上安装“捆绑安装”,但我发现 sqlite3 -v '1.3.4' 丢失了。当我尝试 gem install sqlite3 -v '1.3.4' 时,我得到了以下内容

ERROR: (I have installed libsqli3-dev and sqlite3-ruby - didn't help)

Building native extensions. This could take a while...
ERROR: Error installing sqlite3-ruby:
ERROR: Failed to build gem native extension.

/home/jars/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
checking for sqlite3.h... yes
checking for sqlite3_libversion_number() in -lsqlite3... yes
checking for rb_proc_arity()... yes
checking for sqlite3_initialize()... no
checking for sqlite3_backup_init()... no
checking for sqlite3_column_database_name()... yes
checking for sqlite3_enable_load_extension()... yes
checking for sqlite3_load_extension()... yes
creating Makefile

make
gcc -I. -I/home/jars/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/i686-linux -I/home/jars/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/jars/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1 -I. -DHAVE_RB_PROC_ARITY -DHAVE_SQLITE3_COLUMN_DATABASE_NAME -DHAVE_SQLITE3_ENABLE_LOAD_EXTENSION -DHAVE_SQLITE3_LOAD_EXTENSION -D_FILE_OFFSET_BITS=64 -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -o backup.o -c backup.c
gcc -I. -I/home/jars/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/i686-linux -I/home/jars/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/jars/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1 -I. -DHAVE_RB_PROC_ARITY -DHAVE_SQLITE3_COLUMN_DATABASE_NAME -DHAVE_SQLITE3_ENABLE_LOAD_EXTENSION -DHAVE_SQLITE3_LOAD_EXTENSION -D_FILE_OFFSET_BITS=64 -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -o exception.o -c exception.c
gcc -I. -I/home/jars/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/i686-linux -I/home/jars/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/jars/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1 -I. -DHAVE_RB_PROC_ARITY -DHAVE_SQLITE3_COLUMN_DATABASE_NAME -DHAVE_SQLITE3_ENABLE_LOAD_EXTENSION -DHAVE_SQLITE3_LOAD_EXTENSION -D_FILE_OFFSET_BITS=64 -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -o database.o -c database.c
database.c: In function ‘initialize’:
database.c:47: error: ‘SQLITE_OPEN_READWRITE’ undeclared (first use in this function)
database.c:47: error: (Each undeclared identifier is reported only once
database.c:47: error: for each function it appears in.)
database.c:47: error: ‘SQLITE_OPEN_CREATE’ undeclared (first use in this function)
database.c:72: error: ‘SQLITE_OPEN_READONLY’ undeclared (first use in this function)
database.c: In function ‘set_sqlite3_func_result’:
database.c:278: error: ‘sqlite3_int64’ undeclared (first use in this function)
make: *** [database.o] Error 1


Gem files will remain installed in /home/jars/.rvm/gems/ruby-1.9.2-p290/gems/sqlite3-1.3.4 for inspection.
Results logged to /home/jars/.rvm/gems/ruby-1.9.2-p290/gems/sqlite3-1.3.4/ext/sqlite3/gem_make.out

最佳答案

有什么原因不能从 Apt 存储库安装 sqlite3 吗?

$ apt-cache show sqlite3
Package: sqlite3
Priority: optional
...
Version: 3.7.7-2ubuntu2

关于ubuntu - 在 Ubuntu 上安装 sqlite3 gem 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8141427/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com