问题描述
我在Linux虚拟机上安装“ rgl”时遇到问题(Ubuntu 18.04-底部的详细信息)。有几个相关的问题可以通过安装所需的依赖项来解决,但是在我的实例中,那些依赖文件存在并且在安装R软件包“ rgl”时R找不到。
有问题的文件是GL/gl.h
和GL/glu.h
运行标准install.packages("rgl")
时,R在安装报告中给我这个错误:
checking GL/gl.h usability... no
checking GL/gl.h presence... no
checking for GL/gl.h... no
checking GL/glu.h usability... no
checking GL/glu.h presence... no
checking for GL/glu.h... no
configure: error: missing required header GL/gl.h
ERROR: configuration failed for package ‘rgl’
* removing ‘/opt/conda/lib/R/library/rgl’
Warning in install.packages :
installation of package ‘rgl’ had non-zero exit status
但是,这些文件确实存在于/usr/include/GL/
中,如下所示:
root@[REDACTED]:/usr/include/GL# ls -la
total 1520
drwxr-xr-x 1 root root 6 Oct 27 23:38 .
drwxr-xr-x 1 root root 4096 Oct 27 23:36 ..
-rw-r--r-- 1 root root 80393 Jun 12 01:21 gl.h
-rw-r--r-- 1 root root 421419 Jun 12 01:21 glcorearb.h
-rw-r--r-- 1 root root 848217 Jun 12 01:21 glext.h
-rw-r--r-- 1 root root 17255 May 21 2016 glu.h
-rw-r--r-- 1 root root 3315 May 21 2016 glu_mangle.h
-rw-r--r-- 1 root root 14578 Jun 12 01:21 glx.h
-rw-r--r-- 1 root root 48752 Jun 12 01:21 glxext.h
-rw-r--r-- 1 root root 4706 Apr 3 2018 glxint.h
-rw-r--r-- 1 root root 2086 Apr 3 2018 glxmd.h
-rw-r--r-- 1 root root 81112 Apr 3 2018 glxproto.h
-rw-r--r-- 1 root root 11436 Apr 3 2018 glxtokens.h
drwxr-xr-x 1 root root 37 Sep 22 04:24 internal
我尝试使用以下命令从终端安装软件包:
wget https://cloud.r-project.org/src/contrib/rgl_0.100.54.tar.gz
然后
R CMD INSTALL --configure-args="--with-gl-includes=/usr/include/GL/" rgl_0.100.54.tar.gz
但这也不起作用。
TBH,我不是Linux专家,所以不确定我是不是已经关闭并犯了简单的错误,还是在引擎盖下发生了重大事情来阻止此操作。我还使用R(使用PATH
)和终端中的Sys.setenv("PATH"="[LONG-PATH-HERE]")
变量尝试了很多事情。在rgl包的“ config”文件中查找时,似乎在寻找文件的正确位置,但是我不确定该文件如何执行。
操作系统版本:
LSB Version: core-9.20170808ubuntu1-noarch:printing-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic
R版本:
> R.version
_
platform x86_64-conda_cos6-linux-gnu
arch x86_64
os linux-gnu
system x86_64,linux-gnu
status
major 3
minor 6.3
year 2020
month 02
day 29
svn rev 77875
language R
version.string R version 3.6.3 (2020-02-29)
nickname Holding the Windsock
谢谢你,各位同志们。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)