It seems that I have troubles isntalling the rgl package on Ubuntu. When running
install.packages("rgl")
I got the following error
checking for gcc... gcc -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 -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for gcc... (cached) gcc -std=gnu99
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc -std=gnu99 accepts -g... (cached) yes
checking for gcc -std=gnu99 option to accept ISO C89... (cached) none needed
checking whether __attribute__((visibility())) is supported... yes
checking whether gcc -std=gnu99 accepts -fvisibility... yes
checking whether accepts -fvisibility... no
checking for libpng-config... yes
configure: using libpng-config
configure: using libpng dynamic linkage
checking for X... libraries , headers
checking GL/gl.h usability... yes
checking GL/gl.h presence... yes
checking for GL/gl.h... yes
checking GL/glu.h usability... no
checking GL/glu.h presence... no
checking for GL/glu.h... no
Warning in install.packages :
installation of package \u2018rgl\u2019 had non-zero exit status
It looks like the error appears in the alst three lines. My session info is
> sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] doMC_1.3.3 doParallel_1.0.8
[3] bit64_0.9-4 bit_1.1-12
[5] Defaults_1.1-1 quantstrat_0.9.1669
[7] blotter_0.9.1666 Rcpp_0.11.5
[9] iterators_1.0.7 foreach_1.4.2
[11] base64enc_0.1-2 FinancialInstrument_1.2.0
[13] quantmod_0.4-4 PerformanceAnalytics_1.4.3541
[15] TTR_0.22-0 data.table_1.9.4
[17] xts_0.9-7 zoo_1.7-12
loaded via a namespace (and not attached):
[1] chron_2.3-45 codetools_0.2-10 compiler_3.1.2 grid_3.1.2
[5] lattice_0.20-30 plyr_1.8.1 reshape2_1.4.1 stringr_0.6.2
[9] tools_3.1.2
Does anybody know where is the catch?
Here we are on Ubuntu 18.04 and have similar problems installing rgl.
So we add all this dependencies (some taken from previous answers):
sudo apt install libftgl2 libcgal-dev libglu1-mesa-dev libglu1-mesa-dev libx11-dev libfreetype6-dev
and after lot of trying, we got it working !
We also published this solution here: https://r-forge.r-project.org/tracker/?group_id=234&atid=946&func=detail&aid=6553
You actually need the following packages:
libcgal-dev, libglu1-mesa-dev, libglu1-mesa-dev
You can install them on a machine with apt-get
as follows:
sudo apt-get install libcgal-dev libglu1-mesa-dev libglu1-mesa-dev
That should solve the dependency problems
To install X11 header files:
sudo apt-get install libx11-dev
You need OpenGL libraries installed. The easiest thing to do will be to add Michael Rutter's PPA to your repository list and installing r-cran-rgl
:
sudo add-apt-repository ppa:marutter/rrutter
sudo apt-get update
sudo apt-get install r-cran-rgl
If you need to run without X11, I believe that the answer to this question will help (you may need to sudo apt-get install xvfb
first ...)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With