Installing Rglpk on linux

后端 未结 3 923
慢半拍i
慢半拍i 2021-01-19 01:01

I am trying to install Rglpk using the install.packages command. I am getting this error : /bin/sh: line 0: cd: GLPK: No such file or directory make: *** [GLPK.ts] Error 1

相关标签:
3条回答
  • 2021-01-19 01:45

    Hi what I did was the following as a sudoer

    cd usr local
    wget http://ftp.gnu.org/gnu/glpk/glpk-4.54.tar.gz
    tar xfzv glpk-4.54.tar.gz
    mkdir GLPK
    ./configure
    make
    make install
    

    then download the Rglpk_0.6-0.tar.gz and install.package the usual way. It is basically the same as what was done here, but as a sudoer:

    0 讨论(0)
  • 2021-01-19 01:45

    My experience was the following as a sudoer:

    1. install GLPK package: see https://en.wikibooks.org/wiki/GLPK/Linux_OS

    2. install Rglpk:

    # install devtools package beforehand. Or, you can download the Rglpk package manually, and then install in R.

    # note that the latest version of Rglpk does not work on my Redhat system. Instead, the version 0.6-0 works perfectly.

    devtools::install_url("https://cran.r-project.org/src/contrib/Archive/Rglpk/Rglpk_0.6-0.tar.gz")

    Testing: in R, try require(Rgplk)

    0 讨论(0)
  • 2021-01-19 01:50

    I got this fixed by running 'sudo make' and 'sudo make install' instead of 'make' and 'make install'. Not sure if this is good practice, someone else be the judge.

    cd $HOME
    wget http://ftp.gnu.org/gnu/glpk/glpk-4.65.tar.gz
    tar xfzv glpk-4.65.tar.gz
    mkdir GLPK
    ./configure
    sudo make
    sudo make install
    

    Then run install.packages('Rglpk') from within R.

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