通过gem install tiny_tds在OSX 10.6上安装TinyTDS时出错

时间:2012-08-20 18:25:30

标签: freetds tiny-tds

我一直在尝试使用OSX 10.6在Macbook上安装TinyTDS gem。我成功安装了免费TDS - 确认它的工作原理是:

tsql -H SERVER -p 1433 -U username.

我从 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/jason/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
checking for iconv_open() in iconv.h... no
checking for iconv_open() in -liconv... yes
checking for sybfront.h... yes
checking for sybdb.h... yes
checking for tdsdbopen() in -lsybdb... no
-----
freetds is missing.
-----
*** 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.

我已经尝试过指定TDS lib并且包含dirs(/ usr / local / lib和/ usr / local / include)而没有运气。我已尝试从源手动以及通过自制程序重新安装FreeTDS,但这没有任何区别。

我已经看过一些类似的问题,但它们似乎引用了一个定位iconv库的问题,我似乎已经超越了它。

我可能忽略了任何建议或参考?提前谢谢。

4 个答案:

答案 0 :(得分:5)

Ubuntu 14.04上的同样问题解决了:

sudo apt-get install freetds-dev

gem install tiny_tds

日志输出:

Building native extensions.  This could take a while...
/home/david/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/ext/builder.rb:73: warning: Insecure world writable dir /mnt/datapart/david in PATH, mode 040777
Successfully installed tiny_tds-0.6.1
Parsing documentation for tiny_tds-0.6.1
Installing ri documentation for tiny_tds-0.6.1
Done installing documentation for tiny_tds after 0 seconds
1 gem installed

答案 1 :(得分:1)

你需要用自制软件安装freetds

brew update  # always a good idea to update homebrew before installing anything!
brew install freetds

答案 2 :(得分:1)

在我的情况下,似乎没有正确配置符号链接,并使用" brew链接freetds"抛出了需要打开一些权限的错误。我尝试了其他一切,这最终起作用了:

UITableViewCell

免责声明:我处于学习此框架的早期阶段,并且不了解使用覆盖或更改这些权限的后果。

答案 3 :(得分:1)

就我而言,使用brew install ruby安装Ruby 2.3.0是有效的。我从这个问题Cannot install tiny_tds on os.x 10.9.4得到了这个想法。