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

require': libsndfile.so.1: cannot open shared object file #9

Open
dhruvg opened this issue Jan 7, 2013 · 5 comments
Open

require': libsndfile.so.1: cannot open shared object file #9

dhruvg opened this issue Jan 7, 2013 · 5 comments

Comments

@dhruvg
Copy link

dhruvg commented Jan 7, 2013

I can use ruby-audio perfectly fine on my dev machine (mac os x lion). However, on amazon ec2 (rhel), after bundle installing the gem successfully, I get the following error when trying to start my app:

/usr/local/rvm/gems/ruby-1.9.3-p194/gems/ruby-audio-1.6.1/lib/ruby-audio.rb:6:in require': libsndfile.so.1: cannot open shared object file: No such file or directory - /usr/local/rvm/gems/ruby-1.9.3-p194/gems/ruby-audio-1.6.1/lib/rubyaudio_ext.so (LoadError) from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/ruby-audio-1.6.1/lib/ruby-audio.rb:6:inrescue in <top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/ruby-audio-1.6.1/lib/ruby-audio.rb:1:in <top (required)>' from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.2.1/lib/bundler/runtime.rb:68:inrequire'
from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.2.1/lib/bundler/runtime.rb:68:in block (2 levels) in require' from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.2.1/lib/bundler/runtime.rb:66:ineach'
from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.2.1/lib/bundler/runtime.rb:66:in block in require' from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.2.1/lib/bundler/runtime.rb:55:ineach'
from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.2.1/lib/bundler/runtime.rb:55:in require' from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.2.1/lib/bundler.rb:128:inrequire'
from /var/www/anrthis_staging/releases/20130107020957/config/application.rb:7:in <top (required)>' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/commands.rb:39:inrequire'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/commands.rb:39:in <top (required)>' from script/rails:6:inrequire'
from script/rails:6:in `

'

Any ideas what could be the cause for this?

Thanks.

@dhruvg
Copy link
Author

dhruvg commented Jan 7, 2013

Do you know where it is trying to find libsndfile.so.1? If I know that location, then I can try to add a symlink there and point it to where that file actually exists. These are the files I have on my machine (libsndfile.so.1 clearly exists):

/usr/local/lib/libsndfile.so
/usr/local/lib/libsndfile.a
/usr/local/lib/libsndfile.so.1
/usr/local/lib/libsndfile.la
/usr/local/lib/libsndfile.so.1.0.25
/usr/local/share/doc/libsndfile1-dev
/usr/local/share/doc/libsndfile1-dev/html/libsndfile.jpg
/usr/local/share/doc/libsndfile1-dev/html/libsndfile.css

@warhammerkid
Copy link
Owner

If you are using a publicly available AMI, I can check and see if the libsndfile package is installed in a non-standard location. Otherwise, it looks for libsndfile-1.so or libsndfile.so in ['/opt/local/lib', '/usr/local/lib'].

@kriogenx0
Copy link

kriogenx0 commented Jul 3, 2017

I'm using Ubuntu 16. libsndfile is not install to that dir.
It is only installing as an .so.

I tried this, but no luck.

gem install ruby-audio -- --with-sndfile-lib=/usr/lib/x86_64-linux-gnu/libsndfile.so.1

@kriogenx0
Copy link

find /usr -name 'libsndfile*'
/usr/share/doc/libsndfile1
/usr/lib/x86_64-linux-gnu/libsndfile.so.1
/usr/lib/x86_64-linux-gnu/libsndfile.so.1.0.25

@kriogenx0
Copy link

This worked for me:

gem install ruby-audio -- --with-sndfile-dir=$(brew --prefix libsndfile)

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

3 participants