【问题标题】:gem install ruby-odbc -v '0.99995' Not able install on ubuntu 11.10gem install ruby​​-odbc -v '0.99995' 无法在 ubuntu 11.10 上安装
【发布时间】:2013-06-20 15:12:18
【问题描述】:

我在安装 gem ruby​​-odbc -v'0.99995' 时没有出错。 请帮我解决这个错误。我尝试了很多东西,但没有成功。

Building native extensions.  This could take a while...
ERROR:  Error installing ruby-odbc:
    ERROR: Failed to build gem native extension.

/home/sheetal/.rvm/rubies/ruby-1.8.7-p371/bin/ruby extconf.rb
checking for version.h... yes
checking for sql.h... 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
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/home/sheetal/.rvm/rubies/ruby-1.8.7-p371/bin/ruby
    --with-odbc-dir
    --without-odbc-dir
    --with-odbc-include
    --without-odbc-include=${odbc-dir}/include
    --with-odbc-lib
    --without-odbc-lib=${odbc-dir}/lib
ERROR: sql.h not found

我正在使用 ruby​​ 1.8.7 和 rails2

【问题讨论】:

    标签: ruby-on-rails ruby ruby-on-rails-3 ruby-on-rails-3.1 rubygems


    【解决方案1】:

    如果您使用的是 OS X 并遇到此问题,请尝试

        brew install unixodbc
    

    那你应该可以

        gem install ruby-odbc
    

    【讨论】:

      【解决方案2】:

      您是否尝试过安装 unix odbc 开发文件?

      sudo apt-get install unixodbc-dev
      

      【讨论】:

        猜你喜欢
        • 2011-12-19
        • 1970-01-01
        • 1970-01-01
        • 2021-09-04
        • 2017-12-17
        • 1970-01-01
        • 2012-02-22
        • 2019-10-27
        • 1970-01-01
        相关资源
        最近更新 更多