相关疑难解决方法(0)

尝试使用brew而不是ports在Snow Leopard上安装ruby-filemagic

我正在尝试安装ruby-filemagic.

我试过sudo gem install ruby​​-filemagic -v 0.2.2并得到:

ERROR:  Error installing ruby-filemagic:
ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
checking for magic_open() in -lmagic... 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
...
Run Code Online (Sandbox Code Playgroud)

根据这个:http://blog.elctech.com/2009/08/31/installing-ruby-filemagic-on-macos-x-and-ubuntu/

我需要opt-dir设置.选择Mac端口吗?我正在使用自制软件.

关于从这里去哪里的任何建议都会很棒.

直接从gem安装仍然不适合我,但以下命令做了:sudo env ARCHFLAGS =" - arch x86_64"gem install ruby​​-filemagic - …

ruby homebrew

9
推荐指数
2
解决办法
5214
查看次数

标签 统计

homebrew ×1

ruby ×1