在这里,我试图从MS-SQL Server 2008Ubuntu 10上的Rails应用程序中获取数据.但是我无法安装tiny_tds.我按照github给出的步骤进行操作.但没有回应.请指导我正确设置.
二手gem命令:: gem install tiny_tds
这个命令也是:: gem install tiny_tds –with-freetds-include=/usr/local/include/freetds –with-freetds-lib=/usr/local/lib
错误:
Installing tiny_tds (0.4.5) with native extensions /home/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/rubygems/installer.rb:483:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/home/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb
looking for library directory /home/.rvm/gems/ruby-1.9.2-p180@rails3/lib ... no
looking for library directory /home/.rvm/gems/ruby-1.9.2-p180@rails3/lib/freetds ... no
looking for library directory /home/.rvm/gems/ruby-1.9.2-p180@global/lib ... no
looking for library directory /home/.rvm/gems/ruby-1.9.2-p180@global/lib/freetds ... no
looking for library directory /home/.rvm/rubies/ruby-1.9.2-p180/lib ... yes
checking for main() in …Run Code Online (Sandbox Code Playgroud) 我用homebrew(linux端口)来安装freeTDS,我正在尝试使用gem tinytds部署/捆绑安装我的应用程序.在进行bundle安装时我得到了这个错误输出
Installing tiny_tds (0.5.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/home/deployer/.rbenv/versions/1.9.2-p290/bin/ruby extconf.rb
/usr/bin/ld: /opt/homebrew/lib/libsybdb.a(dblib.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/opt/homebrew/lib/libsybdb.a: could not read symbols: Bad value
Run Code Online (Sandbox Code Playgroud)
非常类似于此修复程序,但我没有在我的文件夹中引用的文件:https://stackoverflow.com/a/7119224/1130736
自制lib文件夹的内容:
/opt/homebrew/lib$ ls
libct.a libsybdb.a
Run Code Online (Sandbox Code Playgroud)
完全错误转储:
full error dump:
Installing tiny_tds (0.5.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/home/deployer/.rbenv/versions/1.9.2-p290/bin/ruby extconf.rb
checking for iconv_open() in iconv.h... yes
checking for …Run Code Online (Sandbox Code Playgroud)