Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot load such file -- sqlite3/sqlite3_native #11

Closed
jrichardsz opened this issue Jan 31, 2024 · 5 comments
Closed

cannot load such file -- sqlite3/sqlite3_native #11

jrichardsz opened this issue Jan 31, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@jrichardsz
Copy link

Running with

docker run -d -p 1025:1025 -p 1080:1080 haravich/fake-smtp-server

Throws this error

Starting MailCatcher v0.9.0
<internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from /usr/local/bundle/gems/sqlite3-1.7.1-x86_64-linux/lib/sqlite3.rb:6:in `rescue in <top (required)>'
	from /usr/local/bundle/gems/sqlite3-1.7.1-x86_64-linux/lib/sqlite3.rb:2:in `<top (required)>'
	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from /usr/local/bundle/gems/mailcatcher-0.9.0/lib/mail_catcher/mail.rb:6:in `<top (required)>'
	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from /usr/local/bundle/gems/mailcatcher-0.9.0/lib/mail_catcher/smtp.rb:5:in `<top (required)>'
	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from /usr/local/bundle/gems/mailcatcher-0.9.0/lib/mail_catcher.rb:183:in `block (2 levels) in run!'
	from /usr/local/bundle/gems/mailcatcher-0.9.0/lib/mail_catcher.rb:239:in `rescue_port'
	from /usr/local/bundle/gems/mailcatcher-0.9.0/lib/mail_catcher.rb:182:in `block in run!'
	from /usr/local/bundle/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:193:in `run_machine'
	from /usr/local/bundle/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:193:in `run'
	from /usr/local/bundle/gems/mailcatcher-0.9.0/lib/mail_catcher.rb:180:in `run!'
	from /usr/local/bundle/gems/mailcatcher-0.9.0/bin/mailcatcher:6:in `<top (required)>'
	from /usr/local/bundle/bin/mailcatcher:25:in `load'
	from /usr/local/bundle/bin/mailcatcher:25:in `<main>'
<internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require': Error relocating /usr/local/bundle/gems/sqlite3-1.7.1-x86_64-linux/lib/sqlite3/3.2/sqlite3_native.so: posix_fallocate64: symbol not found - /usr/local/bundle/gems/sqlite3-1.7.1-x86_64-linux/lib/sqlite3/3.2/sqlite3_native.so (LoadError)
	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from /usr/local/bundle/gems/sqlite3-1.7.1-x86_64-linux/lib/sqlite3.rb:4:in `<top (required)>'
	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from /usr/local/bundle/gems/mailcatcher-0.9.0/lib/mail_catcher/mail.rb:6:in `<top (required)>'
	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from /usr/local/bundle/gems/mailcatcher-0.9.0/lib/mail_catcher/smtp.rb:5:in `<top (required)>'
	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from /usr/local/bundle/gems/mailcatcher-0.9.0/lib/mail_catcher.rb:183:in `block (2 levels) in run!'
	from /usr/local/bundle/gems/mailcatcher-0.9.0/lib/mail_catcher.rb:239:in `rescue_port'
	from /usr/local/bundle/gems/mailcatcher-0.9.0/lib/mail_catcher.rb:182:in `block in run!'
	from /usr/local/bundle/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:193:in `run_machine'
	from /usr/local/bundle/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:193:in `run'
	from /usr/local/bundle/gems/mailcatcher-0.9.0/lib/mail_catcher.rb:180:in `run!'
	from /usr/local/bundle/gems/mailcatcher-0.9.0/bin/mailcatcher:6:in `<top (required)>'
	from /usr/local/bundle/bin/mailcatcher:25:in `load'
	from /usr/local/bundle/bin/mailcatcher:25:in `<main>'
@MatthijsReyers
Copy link

We have the same issue here with a freshly pulled container

@MatthijsReyers
Copy link

The error does not appear with tag 20231015 started with tag 20240121 as far my minimal testing can see.

@haravich haravich added the bug Something isn't working label Feb 2, 2024
@haravich
Copy link
Owner

haravich commented Feb 2, 2024

Use docker run -d -p 1025:1025 -p 1080:1080 haravich/fake-smtp-server:1.0.1 will fix the latest tag with sqllite errors

@haravich
Copy link
Owner

image

@BramMeerten
Copy link

BramMeerten commented Jun 27, 2024

@haravich will there be a fix for later versions?
Version 1.0.1 does not support linux/arm64. I tried with version 1.0.3 (which does support linux/arm64), but sqlite error still occurs for that version.

edit: I've tried building the latest version, but the sqlite error remains: docker build . -t my-fake-smtp --build-arg VERSION=0.10.0

edit 2: I've got it working by downgrading to sqlite 1.6.9, in dockerfile:

&& gem install sqlite3 -v 2.0.0 --no-document --platform ruby \

But it should also work with a later sqlite version and a different base image according to this ticket, but couldn't get that working immediately.

Eventually I used a different image wich works out of the box: dockage/mailcatcher

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants