【发布时间】:2016-02-08 02:48:46
【问题描述】:
嘿,我尝试运行以下命令安装 swirl:
install.packages("swirl")
我收到以下错误:
------------------------- 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=...'
--------------------------------------------------------------------
ERROR: configuration failed for package ‘curl’
* removing ‘/home/franco/R/x86_64-pc-linux-gnu-library/3.1/curl’
Warning in install.packages :
installation of package ‘curl’ had non-zero exit status
* installing *source* package ‘RCurl’ ...
** package ‘RCurl’ successfully unpacked and MD5 sums checked
checking for curl-config... no
Cannot find curl-config
ERROR: configuration failed for package ‘RCurl’
* removing ‘/home/franco/R/x86_64-pc-linux-gnu-library/3.1/RCurl’
Warning in install.packages :
installation of package ‘RCurl’ had non-zero exit status
ERROR: dependency ‘curl’ is not available for package ‘httr’
* removing ‘/home/franco/R/x86_64-pc-linux-gnu-library/3.1/httr’
Warning in install.packages :
installation of package ‘httr’ had non-zero exit status
ERROR: dependencies ‘httr’, ‘RCurl’ are not available for package ‘swirl’
* removing ‘/home/franco/R/x86_64-pc-linux-gnu-library/3.1/swirl’
Warning in install.packages :
installation of package ‘swirl’ had non-zero exit status
The downloaded source packages are in
‘/tmp/Rtmp7G87EM/downloaded_packages’
我尝试安装“curl”和“RCurl”软件包,但收到相同的错误消息。我不知道如何按照 ANTICONF ERROR 中的指示更改路径。
我正在运行 Ubuntu 15.04 和 R 版本 3.1.2 (2014-10-31)
【问题讨论】:
-
你试过
install.packages('swirl', dependencies = TRUE)吗? -
你试过
apt-get install libcurl4-openssl-dev吗? -
@DavidMaust
apt-get install libcurl14-openssl-dev做到了。非常感谢。 -
检查这个答案是否有同样的问题stackoverflow.com/a/44230727/13626355