Error in installing rgl package

2019-01-08 20:22发布

I have seen this question here: Error in loading rgl package with Mac OS X but there is no mentioning about installation error, which is my case. I cannot install rgl package, using this command in R:

source("http://bioconductor.org/biocLite.R")
biocLite("rgl")

The following error is displayed:

configure: error: X11 not found but required, configure aborted.
ERROR: configuration failed for package ‘rgl’
* removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/rgl’

I checked this address /Library/Frameworks/R.framework/Versions/3.2/Resources/library and there is no rgl folder, so I cannot delete aglrgl.so (or rgl.so), which is the answer to the above-mentioned question. Can you please help me with this installation problem? Thanks.

标签: r linux macos rgl
7条回答
\"骚年 ilove
2楼-- · 2019-01-08 20:36

Not sure about Mac case but on Windows I faced issues downloading the same rgl Package. Installing the RGL requires the devtools package

install.packages("devtools")
library(devtools)
install.packages("rgl")
library(rgl)
查看更多
霸刀☆藐视天下
3楼-- · 2019-01-08 20:39

All the mentioned answers are correct; however, none is for Mac.

In my case (I am a Mac user), I solved the problem by installing XQuartz and restarting R.

查看更多
趁早两清
4楼-- · 2019-01-08 20:47

Took me a long time to figure this out on the [RHEL 3.10.0-862.14.4.el7.x86_64 x86_64 x86_64 x86_64 GNU/Linux]. The following packages are required:

libpng12-devel.x86_64
ImageMagick-c++-devel.x86_64
mesa-libGLU-devel.x86_64
libselinux-devel.x86_64
xorg-x11-apps
查看更多
Summer. ? 凉城
5楼-- · 2019-01-08 20:48

On Ubuntu, what worked for me was to install the package directly from the command line:

sudo apt-get install r-cran-rgl

(We have a strange setup here, so YMMV)

查看更多
我想做一个坏孩纸
6楼-- · 2019-01-08 20:58

On OpenSuse

sudo zypper install xorg-x11-devel
sudo zypper install glu-devel
查看更多
Melony?
7楼-- · 2019-01-08 20:59

On CentOS, what finally did the trick was installing libpng-dev:

sudo yum install libpng-devel.x86_64

Prior to this, I installed xorg, libx11, the mesa GL library, and freeglut.

sudo yum install xorg-x11-server-Xvfb.x86_64 xorg-x11-server-devel.x86_64 
sudo yum install libX11.x86_64 libX11-devel.x86_64
sudo yum install mesa-libGL mesa-libGL-devel mesa-libGLU mesa-libGLU-devel
sudo yum install freeglut.x86_64 freeglut-devel.x86_64

The way I finally figured out what was missing was to try compiling from source (download the tar.gz at cran), and examining the config.log after ./configure failed.

查看更多
登录 后发表回答