首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在centos 6下安装R "rgl“软件包?

如何在centos 6下安装R "rgl“软件包?
EN

Stack Overflow用户
提问于 2015-11-04 02:19:23
回答 2查看 3K关注 0票数 4

我下面有环境,CentOS版本6.4,RVersion3.2.2。

我想为R安装"rgl“包,在开始时,我使用了install.packages("rgl"),它在下面抛出错误:

代码语言:javascript
复制
 Installing package into ‘/usr/lib64/R/library’
(as ‘lib’ is unspecified)
trying URL 'http://mirror.bjtu.edu.cn/cran/src/contrib/rgl_0.95.1367.tar.gz'
Content type 'application/octet-stream' length 2033202 bytes (1.9 MB)
==================================================
downloaded 1.9 MB

* installing *source* package ‘rgl’ ...
** package ‘rgl’ successfully unpacked and MD5 sums checked
checking for gcc... gcc -m64 -std=gnu99
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -m64 -std=gnu99 accepts -g... yes
checking for gcc -m64 -std=gnu99 option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -m64 -std=gnu99 -E
checking for gcc... (cached) gcc -m64 -std=gnu99
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc -m64 -std=gnu99 accepts -g... (cached) yes
checking for gcc -m64 -std=gnu99 option to accept ISO C89... (cached) none needed
checking whether __attribute__((visibility())) is supported... yes
checking whether gcc -m64 -std=gnu99 accepts -fvisibility... yes
checking whether  accepts -fvisibility... no
checking for libpng-config... no
checking libpng... checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking png.h usability... no
checking png.h presence... no
checking for png.h... no
checking for png_read_update_info in -lpng... no
configure: libpng header and lib found
configure: using libpng dynamic linkage
checking for X... no
configure: error: X11 not found but required, configure aborted.
ERROR: configuration failed for package ‘rgl’
* removing ‘/usr/lib64/R/library/rgl’

The downloaded source packages are in
    ‘/tmp/Rtmp6mou8m/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("rgl") :
  installation of package ‘rgl’ had non-zero exit status

然后我尝试使用from安装"rgl“包。我从http://cran.at.r-project.org/web/packages/rgl/index.html下载了”http://cran.at.r-project.org/web/packages/rgl/index.html“。我通过R CMD INSTALL命令安装了它:

代码语言:javascript
复制
[root@srv005 RFile]# R CMD INSTALL -l rgl_0.95.1367.tar.gz 
Error: ERROR: no packages specified
[root@srv005 RFile]# R CMD INSTALL rgl_0.95.1367.tar.gz 
* installing to library ?.usr/lib64/R/library?
* installing *source* package ?.gl?....
** package ?.gl?.successfully unpacked and MD5 sums checked
checking for gcc... gcc -m64 -std=gnu99
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -m64 -std=gnu99 accepts -g... yes
checking for gcc -m64 -std=gnu99 option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -m64 -std=gnu99 -E
checking for gcc... (cached) gcc -m64 -std=gnu99
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc -m64 -std=gnu99 accepts -g... (cached) yes
checking for gcc -m64 -std=gnu99 option to accept ISO C89... (cached) none needed
checking whether __attribute__((visibility())) is supported... yes
checking whether gcc -m64 -std=gnu99 accepts -fvisibility... yes
checking whether  accepts -fvisibility... no
checking for libpng-config... no
checking libpng... checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking png.h usability... no
checking png.h presence... no
checking for png.h... no
checking for png_read_update_info in -lpng... no
configure: libpng header and lib found
configure: using libpng dynamic linkage
checking for X... no
configure: error: X11 not found but required, configure aborted.
ERROR: configuration failed for package ?.gl?
* removing ?.usr/lib64/R/library/rgl?

这也不起作用。

有没有人知道如何在CentOS中安装这个"rgl“包?或者软件包根本不能安装在CentOS中?谢谢。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2015-11-04 02:55:19

在RHEL上,你必须安装libX11 11-devel,AFAIR

代码语言:javascript
复制
sudo yum install libX11-devel

我想在CentOS上也是一样的。

票数 2
EN

Stack Overflow用户

发布于 2016-08-08 20:30:00

我还必须安装openGL和GLU库。

代码语言:javascript
复制
sudo yum install mesa-libGL mesa-libGL-devel mesa-libGLU mesa-libGLU-devel
sudo yum groupinstall X11
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33512641

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档