使用rgl包时,RStudio中止会话

时间:2017-09-15 00:25:18

标签: rstudio

我正在使用Lubuntu 16.04.02的8岁机器。由于某些奇怪的原因,我无法以通常的方式安装R,因此我编译并从源代码安装它。这是我的配置文件命令:

./ configure --enable-R-shlib --with-blas --with-lapack --with-x = yes --enable-BLAS-shlib --with-tcltk

从终端我可以毫无问题地运行

ejam@ejam:~/Documents/3ATD$ R

R version 3.4.1 (2017-06-30) -- "Single Candle"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(rgl)
> open3d()
glX 
  1 
> x <- sort(rnorm(1000))
> y <- sort(rnorm(1000))
> z <- sort(rnorm(1000))+atan2(x,y)
> plot3d(x,y,z,col=rainbow(1000))
> 

但是,当我尝试在RStudio中运行它时,会话立即中止。它显示的消息类似于此处显示的消息:R rgl Package crashes Rstudio

我的R会话日志如下:

R version 3.4.1 (2017-06-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.3 LTS

Matrix products: default
LAPACK: /usr/local/lib/R/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=es_MX.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=es_MX.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=es_MX.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=es_MX.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.4.1 tools_3.4.1   

感谢任何帮助。

编辑1:

我从终端

跑了
$ gdb
(gdb) file rstudio

在打开的RStudio窗口中,我输入了

> library(rgl)
> open3d()

会议立即中止。

终端显示

Starting program: /usr/bin/rstudio 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffeac19700 (LWP 4288)]
[New Thread 0x7fffdc7c7700 (LWP 4289)]
[New Thread 0x7fffdbfc6700 (LWP 4290)]
[New Thread 0x7fffdb7c5700 (LWP 4291)]
[New Thread 0x7fffdafc4700 (LWP 4292)]
[Thread 0x7fffdafc4700 (LWP 4292) exited]
[New Thread 0x7fffdafc4700 (LWP 4319)]
[New Thread 0x7fffda7c3700 (LWP 4321)]
[New Thread 0x7fffd94d1700 (LWP 4325)]
[New Thread 0x7fffd8cd0700 (LWP 4326)]
[New Thread 0x7fff82026700 (LWP 4328)]
[New Thread 0x7fff81825700 (LWP 4329)]
load glyph failed err=6 face=0x1103500, glyph=2797
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
load glyph failed err=6 face=0x1103500, glyph=2797
libpng warning: iCCP: known incorrect sRGB profile
[Thread 0x7fffdb7c5700 (LWP 4291) exited]
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile

1 个答案:

答案 0 :(得分:0)

我认为问题更为笼统。我尝试了几个非标准R库中的几个例子(我的意思是R中默认不存在的库),例如'rgl','kernlab'和'TDA'。有趣的是,我可以从终端完美地运行这些示例。

我承认在配置R源时尝试添加“--enable-BLAS-shlib”标志时遇到了一些麻烦。我已经重新编译了R没有这样的标志,RStudio现在可以正常工作。