Problems installing gsl gem

后端 未结 10 693
傲寒
傲寒 2020-12-15 05:12

I can succesfully install the gsl library in my home directory, but when I try to install the gsl gem I get a big list of errors that I do not understand. I am wondering if

相关标签:
10条回答
  • 2020-12-15 05:55

    On my fresh install of Mac OS X Yosemite, I needed specifically 1.15.3, and homebrew can't get that for me (there is no brew install gsl115)

    curl ftp://ftp.gnu.org/gnu/gsl/gsl-1.15.tar.gz > gsl-1.15.tar.gz
    tar xvzf gsl-1.15.tar.gz
    cd gsl-1.15
    ./configure
    make
    sudo make install
    gem install gsl
    
    0 讨论(0)
  • 2020-12-15 05:59

    For anyone still struggling to install this with the gsl_matrix_complex_equal issue.

    If you have run brew install gsl which will as of this writing install 1.15 and then attempted to install the ruby bindings, you will potentially run into this problem.

    Using this repo as your rb-gsl gem source solves the issue: https://github.com/30robots/rb-gsl

    However, if you have a newer version of rubygems, that repo makes a call to Gem#searcher which is a deprecated and now removed method.

    My repo updates that call to use the Gem::Specification API:

    https://github.com/whistlerbrk/rb-gsl

    So in short:

    brew install gsl on OSX

    and in your Gemfile:

    gem 'gsl', :git => 'git://github.com/whistlerbrk/rb-gsl.git'

    0 讨论(0)
  • 2020-12-15 06:00

    lsb_release -a Ubuntu 14.04.1 LTS
    ruby --version ruby 2.1.2p95


    Important: Install gsl development package (https://askubuntu.com/a/490475/121418)
    sudo apt-get install libgsl0-dev

    Add this line in Gemfile
    gem 'rb-gsl'

    Install gem via Terminal
    bundle install


    Verify
    bundle show rb-gsl
    /.rvm/gems/ruby-2.1.2/gems/rb-gsl-1.16.0.4

    gsl-config --version
    1.15


    Use require "gsl" in ruby file if necessary

    0 讨论(0)
  • 2020-12-15 06:10

    For ubuntu 13.10, ruby 2.0.0 works fine next-

    curl -O http://ftp.unicamp.br/pub/gnu/gsl/gsl-1.16.tar.gz
    tar xvzf gsl-1.16.tar.gz
    cd gsl-1.16
    ./configure
    make
    sudo make install
    sudo gem install --conservative --no-ri --no-rdoc gsl
    

    Attention: Ami Navon wrote-

    Must install older version 1.14 for ruby/gsl to work

    It is not actual now for gsl-1.16/ruby-2.0.0

    0 讨论(0)
提交回复
热议问题