答案 0 :(得分:2)
当我使用Docker文件构建容器时,我会收到一些消息:
Warning messages:
1: In install.packages("forecast") :
installation of package ‘curl’ had non-zero exit status
2: In install.packages("forecast") :
installation of package ‘TTR’ had non-zero exit status
3: In install.packages("forecast") :
installation of package ‘quantmod’ had non-zero exit status
4: In install.packages("forecast") :
installation of package ‘tseries’ had non-zero exit status
5: In install.packages("forecast") :
installation of package ‘forecast’ had non-zero exit status
这些消息的根目录是以下错误:
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libcurl was not found. Try installing:
* deb: libcurl4-openssl-dev (Debian, Ubuntu, etc)
* rpm: libcurl-devel (Fedora, CentOS, RHEL)
* csw: libcurl_dev (Solaris)
If libcurl is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libcurl.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=...'
--------------------------------------------------------------------
因此,在安装R软件包之前运行apt-get install libcurl4-openssl-dev
应该可以解决您的问题。