An error occurred while installing ruby-audio (1.6.1) (Using Amazon Linux)

458 views Asked by At

I have asked a similar question before(refs => [Solved]Gem installation ruby-audio-1.6.1 error(using Mac OS 10.9 / homebrew)) and It worked.

But in this case, it happened again while deploying. Trying to fix it as I used to on Homebrew though, Unfortunately,I have no idea to solve this on Amazon Linux...

It would be really appreciated if you give me some feedback on this ...


# Error while deploying(An error occurred while installing ruby-audio (1.6.1))

** [out :: **.com] Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
** [out :: **.com] 
** [out :: **.com] /var/**/.rbenv/versions/2.0.0-p451/bin/ruby extconf.rb
** [out :: **.com] checking for sndfile.h in /opt/local/include,/usr/local/include,C:/Program Files (x86)/Mega-Nerd/libsndfile/include,C:/Program Files/Mega-Nerd/libsndfile/include... yes
** [out :: **.com] checking for sf_open() in -lsndfile-1... no
** [out :: **.com] checking for sf_open() in -lsndfile... no
** [out :: **.com] *** extconf.rb failed ***
** [out :: **.com] Could not create Makefile due to some reason, probably lack of necessary
** [out :: **.com] libraries and/or headers.  Check the mkmf.log file for more details.  You may
** [out :: **.com] need configuration options.
** [out :: **.com] 
** [out :: **.com] Provided configuration options:
** [out :: **.com] --with-opt-dir
** [out :: **.com] --without-opt-dir
** [out :: **.com] --with-opt-include
** [out :: **.com] --without-opt-include=${opt-dir}/include
** [out :: **.com] --with-opt-lib
** [out :: **.com] --without-opt-lib=${opt-dir}/lib
** [out :: **.com] --with-make-prog
** [out :: **.com] --without-make-prog
** [out :: **.com] --srcdir=.
** [out :: **.com] --curdir
** [out :: **.com] --ruby=/var/**/.rbenv/versions/2.0.0-p451/bin/ruby
** [out :: **.com] --with-sndfile-dir
** [out :: **.com] --without-sndfile-dir
** [out :: **.com] --with-sndfile-include
** [out :: **.com] --without-sndfile-include=${sndfile-dir}/include
** [out :: **.com] --with-sndfile-lib
** [out :: **.com] --without-sndfile-lib=${sndfile-dir}/
** [out :: **.com] --with-sndfile-1lib
** [out :: **.com] --without-sndfile-1lib
** [out :: **.com] --with-sndfilelib
** [out :: **.com] --without-sndfilelib
** [out :: **.com] extconf.rb:21:in `<main>':   Can't find libsndfile (http://www.mega-nerd.com/libsndfile/) (RuntimeError)
** [out :: **.com] 
** [out :: **.com] Try passing --with-sndfile-dir or --with-sndfile-lib and --with-sndfile-include
** [out :: **.com] options to extconf. If there are spaces in the path on windows, it may not work.
** [out :: **.com] 
** [out :: **.com] 
** [out :: **.com] Gem files will remain installed in /var/**/shared/bundle/ruby/2.0.0/gems/ruby-audio-1.6.1 for inspection.
** [out :: **.com] Results logged to /var/**/shared/bundle/ruby/2.0.0/gems/ruby-audio-1.6.1/ext/rubyaudio_ext/gem_make.out
** [out :: **.com] An error occurred while installing ruby-audio (1.6.1), and Bundler cannot
** [out :: **.com] continue.
** [out :: **.com] Make sure that `gem install ruby-audio -v '1.6.1'` succeeds before bundling.

Before installing ruby-audio,I Installed libsndfile on Amazon Linux like this...
refs ~> http://www.linuxfromscratch.org/~krejzi/kde5/multimedia/libsndfile.html

# on Amazon Linux
cd /usr/share/doc/

curl -O http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.25.tar.gz

tar xzvf libsndfile-1.0.25.tar.gz

cd libsndfile-1.0.25

./configure --prefix=/usr --disable-static && make

sudo make htmldocdir=/usr/share/doc/libsndfile-1.0.25 install
0

There are 0 answers