在OSX 10.10 Yosemite上安装tiny_tds时出错

时间:2014-10-28 16:35:50

标签: ruby macos gem osx-yosemite

互联网,我不知道该怎么做。升级到优胜美地后,我无法安装tiny_tds

$ gem install tiny_tds
Building native extensions.  This could take a while...
ERROR:  Error installing tiny_tds:
ERROR: Failed to build gem native extension.

/Users/jpolley/.rvm/rubies/ruby-2.1.1/bin/ruby extconf.rb
checking for iconv_open() in iconv.h... no
checking for iconv_open() in -liconv... no
-----
libiconv is missing.
-----
你能帮忙吗?

1 个答案:

答案 0 :(得分:7)

我安装了Yosemite OSX 10.10和XCode 6.1。

我得到了安装xCode命令工具的建议,允许我安装libiconv。

然后brew安装libiconv。

然后brew链接libiconv。

$ xcode-select --install 
xcode-select: error: command line tools are already installed, 
use "Software Update" to install updates 

然后我做了:

$ brew install libiconv 
Error: No available formula for libiconv Apple distributes libiconv with OS X, 
you can find it in /usr/lib. Some build scripts fail to detect it correctly, 
please check existing formulae for solutions. 

所以我必须这样做:

$ brew tap homebrew/dupes

然后我做了:

$ brew link libiconv 
Warning: libiconv is keg-only and must be linked with --force 
Note that doing so can interfere with building software.

$ brew link libiconv --force 
Linking /usr/local/Cellar/libiconv/1.14... 16 symlinks created 

这让我超越了我的原始错误" libiconv缺失"当试图安装tiny_tds时。我现在得到了一个不同的错误:" freetds缺失"

$ brew install freetds 

最后:

$ gem install tiny_tds 
Building native extensions. This could take a while... 
Successfully installed tiny_tds-0.6.2 Parsing documentation for tiny_tds-0.6.2 
Installing ri documentation for tiny_tds-0.6.2 
Done installing documentation for tiny_tds after 0 seconds 1 gem installed