似乎我在Ubuntu上输入rgl包时遇到了麻烦。 运行时
install.packages("rgl")
我收到以下错误
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
看起来错误出现在三行中。 我的会话信息是
> 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
有人知道捕获的位置在哪里吗?
答案 0 :(得分:9)
您确实需要以下套餐:
sudo apt-get install libcgal-dev libglu1-mesa-dev libglu1-mesa-dev
您可以将它们安装在sudo apt-get install libx11-dev
的计算机上,如下所示:
index
这应解决依赖性问题
安装X11头文件:
count
答案 1 :(得分:8)
您需要安装OpenGL库。最简单的方法是将Michael Rutter's PPA添加到您的存储库列表并安装r-cran-rgl
:
sudo add-apt-repository ppa:marutter/rrutter
sudo apt-get update
sudo apt-get install r-cran-rgl
如果您需要在没有X11的情况下运行,我相信this question的答案会有所帮助(您可能需要sudo apt-get install xvfb
首先......)
答案 2 :(得分:4)
在这里,我们在Ubuntu 18.04上安装rgl时遇到类似的问题。
因此,我们添加了所有这些依赖项(某些来自先前的答案):
sudo apt install libftgl2 libcgal-dev libglu1-mesa-dev libglu1-mesa-dev libx11-dev libfreetype6-dev
经过大量尝试,我们让它正常工作!
我们还在此处发布了此解决方案:https://r-forge.r-project.org/tracker/?group_id=234&atid=946&func=detail&aid=6553
答案 3 :(得分:0)
这是我的解决方案。它在Ubuntu 18.04上运行良好
sudo apt-get install xorg
sudo apt-get install libx11-dev
sudo apt-get install libglu1-mesa-dev
sudo apt-get install libatlas-base-dev
sudo apt-get install gfortran
sudo apt-get install libblas-dev liblapack-dev
sudo apt-get install libblas-dev
sudo apt install python-autopep8
sudo apt install libftgl2 libcgal-dev libglu1-mesa-dev libglu1-mesa-dev libx11-dev libfreetype6-dev
sudo apt-get install libcgal-dev libglu1-mesa-dev libglu1-mesa-dev
install.packages("digest")
install.packages("xtable")
install.packages("rgl")