我正在尝试使用install.packages命令安装Rglpk。我收到此错误:/ bin / sh:第0行:cd:GLPK:没有这样的文件或目录make:*** [GLPK.ts]错误1
已安装glpk-dev软件包:
rpm -qa | grep glpk-dev glpk-devel-4.40-1.1.el6.x86_64
谢谢你的帮助,
嗨,我做的是以下作为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
然后以通常的方式下载Rglpk_0.6-0.tar.gz
和install.package。它基本上与这里所做的相同,但作为一个sudoer:
我的经历是以下作为一个sudoer:
# 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")
测试:在R中,尝试require(Rgplk)