5

我正在尝试使用 install.packages 命令安装 Rglpk。我收到此错误:/bin/sh: line 0: cd: GLPK: No such file or directory make: *** [GLPK.ts] Error 1

glpk-dev 软件包已经安装:

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

谢谢你的帮助,

4

3 回答 3

1

嗨,我做的是以下作为 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:

于 2015-02-27T15:50:03.593 回答
1

我通过运行“sudo make”和“sudo make install”而不是“make”和“make install”来解决这个问题。不确定这是否是好的做法,其他人是法官。

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

然后从 R 中运行 install.packages('Rglpk')。

于 2019-12-16T19:20:12.477 回答
0

作为 sudoer,我的经历如下:

  1. 安装 GLPK 包:见https://en.wikibooks.org/wiki/GLPK/Linux_OS

  2. 安装 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")

测试:在 R 中,尝试require(Rgplk)

于 2019-03-13T15:50:25.087 回答