0

I've setup an app on EC2 using Elastic Beanstalk. It's a Ubuntu instance and I'm running a Rails app on it which depends on sphinxbase and pocketsphinx. I've ssh'd into the EC2 instance to install sphinxbase and its dependencies:

sudo yum install autoconf libtool bison swig git
git clone https://github.com/cmusphinx/sphinxbase.git
cd sphinxbase/
./autogen.sh
./configure
make
make check
sudo make install
# Libraries have been installed in:
#   /usr/local/lib64/python2.7/dist-packages/sphinxbase

After a reboot I navigate to my app's url and I get a Rails error page, looking at the server logs:

Could not open library 'libsphinxbase.so': libsphinxbase.so: cannot open shared object file: No such file or directory (LoadError)
  /opt/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/ffi-1.9.10/lib/ffi/library.rb:133:in `block in ffi_lib'
  /opt/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/ffi-1.9.10/lib/ffi/library.rb:100:in `map'
  /opt/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/ffi-1.9.10/lib/ffi/library.rb:100:in `ffi_lib'
  /opt/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/pocketsphinx-ruby-0.3.0/lib/pocketsphinx/api/sphinxbase.rb:5:in `<module:Sphinxbase>'
  /opt/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/pocketsphinx-ruby-0.3.0/lib/pocketsphinx/api/sphinxbase.rb:3:in `<module:API>'
  /opt/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/pocketsphinx-ruby-0.3.0/lib/pocketsphinx/api/sphinxbase.rb:2:in `<module:Pocketsphinx>'
  /opt/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/pocketsphinx-ruby-0.3.0/lib/pocketsphinx/api/sphinxbase.rb:1:in `<top (required)>'
  /opt/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/pocketsphinx-ruby-0.3.0/lib/pocketsphinx.rb:6:in `require'
  /opt/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/pocketsphinx-ruby-0.3.0/lib/pocketsphinx.rb:6:in `<top (required)>'
  /opt/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/pocketsphinx-ruby-0.3.0/lib/pocketsphinx-ruby.rb:1:in `require'
  /opt/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/pocketsphinx-ruby-0.3.0/lib/pocketsphinx-ruby.rb:1:in `<top (required)>'
  /opt/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.9.6/lib/bundler/runtime.rb:76:in `require'
  /opt/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.9.6/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
  /opt/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.9.6/lib/bundler/runtime.rb:72:in `each'
  /opt/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.9.6/lib/bundler/runtime.rb:72:in `block in require'
  /opt/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.9.6/lib/bundler/runtime.rb:61:in `each'
  /opt/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.9.6/lib/bundler/runtime.rb:61:in `require'
  /opt/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.9.6/lib/bundler.rb:134:in `require'
  /var/app/current/config/application.rb:7:in `<top (required)>'
  /var/app/current/config/environment.rb:2:in `require'
  /var/app/current/config/environment.rb:2:in `<top (required)>'
  config.ru:3:in `require'
  config.ru:3:in `block in <main>'
  /opt/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `instance_eval'
  /opt/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `initialize'
  config.ru:1:in `new'
  config.ru:1:in `<main>'
  /opt/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/passenger-4.0.59/helper-scripts/rack-preloader.rb:112:in `eval'
  /opt/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/passenger-4.0.59/helper-scripts/rack-preloader.rb:112:in `preload_app'
  /opt/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/passenger-4.0.59/helper-scripts/rack-preloader.rb:158:in `<module:App>'
  /opt/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/passenger-4.0.59/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
  /opt/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/passenger-4.0.59/helper-scripts/rack-preloader.rb:28:in `<main>'

So it can't find libsphinxbase.so

I'm not sure what to do at this point, and can't find relevant information yet.

Any tips? Thank you.

0

A coworker pointed me to this blog post, it helped out properly installing cmu sphinx and its dependencies.

http://jrmeyer.github.io/installation/2016/01/09/Installing-CMU-Sphinx-on-Ubuntu.html

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.