【发布时间】:2019-04-05 08:52:32
【问题描述】:
我有问题使用 docker rstudio-image rocker/rstudio 建议
在https://www.rocker-project.org/(R 的码头集装箱)上。由于我是 docker 和 RStudio 的初学者,我怀疑问题出在我身上,不值得报告错误:
- 我用“Docker Quickstart Terminal”打开了一个合适的终端
- 我使用
docker run -d -p 8787:8787 -e DISABLE_AUTH=true -v <...>:/home/rstudio/<...> --name rstudio rocker/rstudio运行图像的位置 - 然后在我的浏览器中,我在地址http://192.168.99.100:8787 处获得了一个不错的 RStudio 实例
-
但在这种情况下,我无法安装多个软件包,例如
xml2。我收到消息:Using PKG_CFLAGS= Using PKG_LIBS=-lxml2 ------------------------- ANTICONF ERROR --------------------------- Configuration failed because libxml-2.0 was not found. Try installing: * deb: libxml2-dev (Debian, Ubuntu, etc) * rpm: libxml2-devel (Fedora, CentOS, RHEL) * csw: libxml2_dev (Solaris) If libxml-2.0 is already installed, check that 'pkg-config' is in your PATH and PKG_CONFIG_PATH contains a libxml-2.0.pc file. If pkg-config is unavailable you can set INCLUDE_DIR and LIB_DIR manually via: R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...' -------------------------------------------------------------------- ERROR: configuration failed for package ‘xml2’ * removing ‘/usr/local/lib/R/site-library/xml2’ Warning in install.packages : installation of package ‘xml2’ had non-zero exit status
我不知道xml2 是否在图像上,但文件libxml-2.0.pc 确实存在于我的笔记本电脑的目录/opt/local/lib/pkgconfig 中,pkg-config 位于/opt/local/bin 中。所以我尝试在运行时链接这些 pkg 路径
图像(看看我玩图像环境时会发生什么
在 RStudio 中),将选项 -v
/opt/local/lib/pkgconfig:/home/rstudio/lib/pkgconfig -v
/opt/local/bin:/home/rstudio/bin 添加到运行命令。但它不起作用:出于某种原因
我在 RStudio 中看不到 lib/pkgconfig 的内容...
RStudio 实例也不接受 root/sudo 命令,所以我不能
在 RStudio 终端中使用 apt-get 等工具
那么,有什么诀窍?
【问题讨论】: