Installing Rglpk on linux

淺唱寂寞╮ 提交于 2019-12-01 21:43:45

问题


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

The glpk-dev package is already installed :

rpm -qa| grep glpk-dev glpk-devel-4.40-1.1.el6.x86_64

Thanks for your help,


回答1:


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:




回答2:


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)



来源:https://stackoverflow.com/questions/26594986/installing-rglpk-on-linux

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!