Replies: 1 comment 7 replies
-
Hi, I'll try to help.
Well, you're installing the precompiled version, so you're not compiling, but the compiled extension is present. In your output, you can see:
However, this error message is buried in your output:
This tells me that you're perhaps not on an x86_64-linux system, can you tell us more about your system? What version of rubygems are you running? Did you install this gem via bundler, or via |
Beta Was this translation helpful? Give feedback.
-
Hi everyone,
I am using debian testing with Ruby installed via apt (Ruby 3.1 and gem 3.4.20) and, since last update, the sqlite3 gem installs with no errors but the native extensions are not compiled and the require 'sqlite3' instruction fails with the following error:
irb(main):001:0> require 'sqlite3'
internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:86:in 'require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
from internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:86:in 'require'
from /var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/lib/sqlite3.rb:6:in 'rescue in < top (required) >'
from /var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/lib/sqlite3.rb:2:in `< top (required) >'
from internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:160:in 'require'
from internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:160:in 'rescue in require'
from internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:40:in 'require'
from (irb):1:in '< main >'
from /usr/lib/ruby/gems/3.1.0/gems/irb-1.4.1/exe/irb:11:in '< top (required) >'
from /usr/local/bin/irb:25:in 'load'
from /usr/local/bin/irb:25:in '< main >'
internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:86:in 'require': /lib/x86_64-linux-gnu/libc.so: invalid ELF header - /var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/lib/sqlite3/3.1/sqlite3_native.so (LoadError)
from internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:86:in 'require'
from /var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/lib/sqlite3.rb:4:in '<top (required)>'
from internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:160:in 'require'
from internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:160:in 'rescue in require'
from internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:40:in 'require'
from (irb):1:in '< main >'
from /usr/lib/ruby/gems/3.1.0/gems/irb-1.4.1/exe/irb:11:in '< top (required) >'
from /usr/local/bin/irb:25:in 'load'
from /usr/local/bin/irb:25:in '< main >'
internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:86:in 'require': cannot load such file -- sqlite3 (LoadError)
from internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:86:in 'require'
from (irb):1:in '< main >'
from /usr/lib/ruby/gems/3.1.0/gems/irb-1.4.1/exe/irb:11:in '< top (required) >'
from /usr/local/bin/irb:25:in 'load'
from /usr/local/bin/irb:25:in '< main >'
I also attach here the output of 'gem install sqlite3 --verbose':
sergio@debian:~$ sudo gem install sqlite3 --verbose
HEAD https://index.rubygems.org/
200 OK
GET https://index.rubygems.org/info/sqlite3
200 OK
GET https://index.rubygems.org/quick/Marshal.4.8/sqlite3-2.0.2-x86_64-linux.gemspec.rz
403 Forbidden
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/.gemtest
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/CHANGELOG.md
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/CONTRIBUTING.md
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/FAQ.md
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/INSTALLATION.md
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/LICENSE
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/README.md
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/dependencies.yml
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/ext/sqlite3/aggregator.c
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/ext/sqlite3/aggregator.h
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/ext/sqlite3/backup.c
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/ext/sqlite3/backup.h
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/ext/sqlite3/database.c
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/ext/sqlite3/database.h
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/ext/sqlite3/exception.c
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/ext/sqlite3/exception.h
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/ext/sqlite3/extconf.rb
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/ext/sqlite3/sqlite3.c
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/ext/sqlite3/sqlite3_ruby.h
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/ext/sqlite3/statement.c
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/ext/sqlite3/statement.h
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/ext/sqlite3/timespec.h
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/lib/sqlite3.rb
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/lib/sqlite3/3.0/sqlite3_native.so
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/lib/sqlite3/3.1/sqlite3_native.so
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/lib/sqlite3/3.2/sqlite3_native.so
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/lib/sqlite3/3.3/sqlite3_native.so
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/lib/sqlite3/constants.rb
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/lib/sqlite3/database.rb
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/lib/sqlite3/errors.rb
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/lib/sqlite3/pragmas.rb
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/lib/sqlite3/resultset.rb
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/lib/sqlite3/statement.rb
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/lib/sqlite3/value.rb
/var/lib/gems/3.1.0/gems/sqlite3-2.0.2-x86_64-linux/lib/sqlite3/version.rb
Successfully installed sqlite3-2.0.2-x86_64-linux
1 gem installed
Thank you very much for your help
Beta Was this translation helpful? Give feedback.
All reactions