我正在使用opencpu / rstudio docker镜像。 Docker运行虚拟机,因为我是Windows用户。运行rstudio-server后,我尝试从github安装我的R包。一切正常,直到rgdal应该安装。
我收到以下错误消息:
Installing rgdal
'/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore --
quiet \
CMD INSTALL '/tmp/RtmpJvVTTU/devtools2c362554e5/rgdal' \
--library='/usr/local/lib/opencpu/site-library' --install-tests
* installing *source* package ‘rgdal’ ...
** package ‘rgdal’ successfully unpacked and MD5 sums checked
configure: CC: gcc -std=gnu99
configure: CXX: g++
configure: rgdal: 1.2-16
checking for /usr/bin/svnversion... no
configure: svn revision: 701
checking for gdal-config... no
no
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘rgdal’
* removing ‘/usr/local/lib/opencpu/site-library/rgdal’
Installation failed: Command failed (1)
'/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore --
quiet \
CMD INSTALL \
'/tmp/RtmpJvVTTU/devtools2cd1cfd76/amun-software-Processingservice-6db3f06'
\
--library='/usr/local/lib/opencpu/site-library' --install-tests
我怎么解决这个问题?
答案 0 :(得分:2)
有一些遗失的图书馆。
如果您按如下方式登录Docker容器的shell ...
docker exec -it <your docker container name> bash
您可以安装缺少的依赖项...
sudo apt-get update && sudo apt-get install libgdal-dev libproj-dev
退出shell并从RStudio do ...
install.packages("rgdal")