gem安装ruby-audio-1.6.1错误(使用Mac OS 10.9 / homebrew)

我尝试了其他提示,但没有奏效。 (请参阅下面的链接)
恩。
gem安装ruby-audio失败
ruby-audio 1.6.1安装错误(已安装Libsndfile 1.0.25)

我想要一些反馈。


$ gem install ruby-audio
Building native extensions. This could take a while...
ERROR: Error installing ruby-audio:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
**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
checking for sf_open() in -lsndfile-1... no
checking for sf_open() in -lsndfile... no
**
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
--with-sndfile-dir
--without-sndfile-dir
--with-sndfile-include
--without-sndfile-include=${sndfile-dir}/include
--with-sndfile-lib
--without-sndfile-lib=${sndfile-dir}/
--with-sndfile-1lib
--without-sndfile-1lib
--with-sndfilelib
--without-sndfilelib

**extconf.rb:21:in `': Can't find libsndfile (http://www.mega-nerd.com/libsndfile/) (RuntimeError)**

Try passing --with-sndfile-dir or --with-sndfile-lib and --with-sndfile-include
options to extconf. If there are spaces in the path on windows, it may not work.


Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/ruby-audio-1.6.1 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/ruby-audio-1.6.1/ext/rubyaudio_ext/gem_make.out

您可能需要将libsndfile安装为通用库 – 默认情况下,它不会编译32位切片,这是与系统ruby兼容所必需的。

 brew uninstall libsndfile brew install libsndfile --universal sudo gem install ruby-audio