简体   繁体   English

在 R-Server Ubuntu 上安装 rgl

[英]Install rgl on R-Server Ubuntu

I want to to install rgl on R-Server, running on Ubuntu.我想在 R-Server 上安装 rgl,在 Ubuntu 上运行。 At the bas prompt I installed在 bas 提示符下我安装了

sudo apt-get build-dep r-cran-rgl

Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed:正在读取包列表...完成 构建依赖树 读取状态信息...完成 将安装以下额外的包:
libglu1-mesa The following NEW packages will be installed: libglu1-mesa 将安装以下新软件包:
libglu1-mesa r-cran-rgl 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. libglu1-mesa r-cran-rgl 0 升级,2 新安装,0 删除,0 未升级。 Need to get 1,645 kB of archives.需要获得 1,645 kB 的档案。 After this operation, 3,875 kB of additional disk space will be used.此操作后,将使用 3,875 kB 的额外磁盘空间。 Do you want to continue?你要继续吗? [Y/n] Y Get:1 http://archive.ubuntu.com/ubuntu/ trusty/main libglu1-mesa amd64 9.0.0-2 [195 kB] Get:2 http://archive.ubuntu.com/ubuntu/ trusty/universe r-cran-rgl amd64 0.93.996-1 [1,450 kB] Fetched 1,645 kB in 1s (1,047 kB/s) Selecting previously unselected package libglu1-mesa:amd64. [是/否] 是获取:1 http://archive.ubuntu.com/ubuntu/trusty/main libglu1-mesa amd64 9.0.0-2 [195 kB] 获取:2 http://archive.ubuntu.com/ ubuntu/ trusty/universe r-cran-rgl amd64 0.93.996-1 [1,450 kB] 1 秒内获取 1,645 kB (1,047 kB/s) 选择以前未选择的包 libglu1-mesa:amd64。 (Reading database ... 55586 files and directories currently installed.) Preparing to unpack .../libglu1-mesa_9.0.0-2_amd64.deb ... Unpacking libglu1-mesa:amd64 (9.0.0-2) ... Selecting previously unselected package r-cran-rgl. (正在读取数据库 ... 当前安装的 55586 个文件和目录。)准备解压 .../libglu1-mesa_9.0.0-2_amd64.deb ... 解压 libglu1-mesa:amd64 (9.0.0-2) ... 选择以前未选择的包 r-cran-rgl。 Preparing to unpack .../r-cran-rgl_0.93.996-1_amd64.deb ... Unpacking r-cran-rgl (0.93.996-1) ... Setting up libglu1-mesa:amd64 (9.0.0-2) ... Setting up r-cran-rgl (0.93.996-1) ... Processing triggers for libc-bin (2.19-0ubuntu6.6) ...准备解包 .../r-cran-rgl_0.93.996-1_amd64.deb ... 解包 r-cran-rgl (0.93.996-1) ... 设置 libglu1-mesa:amd64 (9.0.0-2) ) ... 设置 r-cran-rgl (0.93.996-1) ... 处理 libc-bin (2.19-0ubuntu6.6) 的触发器 ...

Thats it.就是这样。 The three points at the end do not indicate that there was more to copy.最后的三点并不表示还有更多的内容可以复制。 Then I logged in into R-Server and tried to run然后我登录到 R-Server 并尝试运行

install.packages("rgl", repos="http://R-Forge.R-project.org")

which resulted in an error, namely:这导致了一个错误,即:

.... 
configure: using libpng-config
configure: using libpng dynamic linkage
checking for X... libraries , headers 
checking GL/gl.h usability... no
checking GL/gl.h presence... no
checking for GL/gl.h... no
checking GL/glu.h usability... no
checking GL/glu.h presence... no
checking for GL/glu.h... no
configure: error: missing required header GL/gl.h
ERROR: configuration failed for package ‘rgl’
* removing ‘/home/clambio/R/x86_64-pc-linux-gnu-library/3.2/rgl’
Warning in install.packages :
  installation of package ‘rgl’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmpT5iyrb/downloaded_packages’

Any ideas what is going wrong?!任何想法出了什么问题?!

I solved this problem by installing我通过安装解决了这个问题

sudo apt-get install mesa-common-dev libglu1-mesa-dev

then install in R again:然后再次安装在R中:

install.packages("rgl")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM