gem install ruby-odbc -v '0.99995'无法在ubuntu 11.10上安装

vwhgwdsa  于 2023-11-18  发布在  Ruby
关注(0)|答案(2)|浏览(150)

我没有得到错误,而安装宝石ruby-odbc -v '0.99995'。请帮助我解决这个错误。我尝试了很多东西,但它没有工作。

  1. Building native extensions. This could take a while...
  2. ERROR: Error installing ruby-odbc:
  3. ERROR: Failed to build gem native extension.
  4. /home/sheetal/.rvm/rubies/ruby-1.8.7-p371/bin/ruby extconf.rb
  5. checking for version.h... yes
  6. checking for sql.h... no
  7. *** extconf.rb failed ***
  8. Could not create Makefile due to some reason, probably lack of
  9. necessary libraries and/or headers. Check the mkmf.log file for more
  10. details. You may need configuration options.
  11. Provided configuration options:
  12. --with-opt-dir
  13. --without-opt-dir
  14. --with-opt-include
  15. --without-opt-include=${opt-dir}/include
  16. --with-opt-lib
  17. --without-opt-lib=${opt-dir}/lib
  18. --with-make-prog
  19. --without-make-prog
  20. --srcdir=.
  21. --curdir
  22. --ruby=/home/sheetal/.rvm/rubies/ruby-1.8.7-p371/bin/ruby
  23. --with-odbc-dir
  24. --without-odbc-dir
  25. --with-odbc-include
  26. --without-odbc-include=${odbc-dir}/include
  27. --with-odbc-lib
  28. --without-odbc-lib=${odbc-dir}/lib
  29. ERROR: sql.h not found

字符串
我使用的是Ruby 1.8.7和Rails 2

nhaq1z21

nhaq1z211#

你试过安装unix odbc开发文件吗?

  1. sudo apt-get install unixodbc-dev

字符串

abithluo

abithluo2#

如果你在OS X上遇到这个问题,

  1. brew install unixodbc

字符串
那么你应该能够

  1. gem install ruby-odbc

相关问题