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

Could not open library libsass.so: cannot open shared object file: No such file or directory (LoadError) #155

Closed
mildred opened this issue Sep 16, 2019 · 1 comment

Comments

@mildred
Copy link

mildred commented Sep 16, 2019

When using sassc-2.2.0, I am getting the following error:

/usr/share/gems/gems/ffi-1.11.1/lib/ffi/library.rb:145:in `block in ffi_lib': Could not open library '/var/home/mildred/.gem/ruby/gems/sassc-2.2.0/lib/sassc/libsass.so': /var/home/mildred/.gem/ruby/gems/sassc-2.2.0/lib/sassc/libsass.so: cannot open shared object file: No such file or directory (LoadError)
	from /usr/share/gems/gems/ffi-1.11.1/lib/ffi/library.rb:99:in `map'
	from /usr/share/gems/gems/ffi-1.11.1/lib/ffi/library.rb:99:in `ffi_lib'
	from /var/home/mildred/.gem/ruby/gems/sassc-2.2.0/lib/sassc/native.rb:10:in `<module:Native>'
	from /var/home/mildred/.gem/ruby/gems/sassc-2.2.0/lib/sassc/native.rb:6:in `<module:SassC>'
	from /var/home/mildred/.gem/ruby/gems/sassc-2.2.0/lib/sassc/native.rb:5:in `<main>'
	from /usr/share/gems/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
	from /usr/share/gems/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
	from /usr/share/gems/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	from /usr/share/gems/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
	from /usr/share/gems/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
	from /usr/share/gems/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
	from /usr/share/gems/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
	from /usr/share/gems/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
	from /usr/share/gems/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `require_relative'
	from /var/home/mildred/.gem/ruby/gems/sassc-2.2.0/lib/sassc.rb:31:in `<main>'
	from /usr/share/gems/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
	from /usr/share/gems/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
	from /usr/share/gems/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	from /usr/share/gems/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
	from /usr/share/gems/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
	from /usr/share/gems/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
	from /usr/share/gems/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
	from /usr/share/gems/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
	from /usr/share/gems/gems/sassc-rails-2.1.2/lib/sassc/rails.rb:5:in `<main>'
	from /usr/share/gems/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
	from /usr/share/gems/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
	from /usr/share/gems/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	from /usr/share/gems/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
	from /usr/share/gems/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
	from /usr/share/gems/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
	from /usr/share/gems/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
	from /usr/share/gems/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
	from /usr/share/gems/gems/sass-rails-6.0.0/lib/sass-rails.rb:1:in `<main>'
	from /usr/share/gems/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
	from /usr/share/gems/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
	from /usr/share/gems/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	from /usr/share/gems/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
	from /usr/share/gems/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
	from /usr/share/gems/gems/bundler-1.17.2/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
	from /usr/share/gems/gems/bundler-1.17.2/lib/bundler/runtime.rb:76:in `each'
	from /usr/share/gems/gems/bundler-1.17.2/lib/bundler/runtime.rb:76:in `block in require'
	from /usr/share/gems/gems/bundler-1.17.2/lib/bundler/runtime.rb:65:in `each'
	from /usr/share/gems/gems/bundler-1.17.2/lib/bundler/runtime.rb:65:in `require'
	from /usr/share/gems/gems/bundler-1.17.2/lib/bundler.rb:114:in `require'
	from /var/home/mildred/Work/Codde/lcas/config/application.rb:7:in `<top (required)>'
	from /usr/share/gems/gems/spring-2.1.0/lib/spring/application.rb:92:in `require'
	from /usr/share/gems/gems/spring-2.1.0/lib/spring/application.rb:92:in `preload'
	from /usr/share/gems/gems/spring-2.1.0/lib/spring/application.rb:157:in `serve'
	from /usr/share/gems/gems/spring-2.1.0/lib/spring/application.rb:145:in `block in run'
	from /usr/share/gems/gems/spring-2.1.0/lib/spring/application.rb:139:in `loop'
	from /usr/share/gems/gems/spring-2.1.0/lib/spring/application.rb:139:in `run'
	from /usr/share/gems/gems/spring-2.1.0/lib/spring/application/boot.rb:19:in `<top (required)>'
	from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require'
	from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require'
	from -e:1:in `<main>'

It comes from the following line:

ffi_lib File.expand_path("libsass.#{dl_ext}", __dir__)

The problem is that the ruby code is looking in sassc-2.2.0/lib/sassc/libsass.so but the .so file is in sassc-2.2.0/ext/libsass.so.

@mildred
Copy link
Author

mildred commented Sep 16, 2019

Oops, this is #146 already.

@mildred mildred closed this as completed Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant