嘿,我试着用下面的命令安装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错误中的指示更改路径。
我正在运行Ubuntu 15.04和R版本3.1.2 (2014-10-31)
发布于 2017-01-12 10:46:22
现在它是
sudo apt-get install libcurl4-gnutls-dev发布于 2019-05-30 05:05:09
2019年5月30日更新:我使用的是Ubuntu 16.04
这是我在安装软件包时得到的--使用PKG_CFLAGS=
配置失败,因为找不到openssl。尝试安装:* deb: libssl-dev (Debian,Ubuntu等)* rpm: openssl-devel (Fedora,CentOS,RHEL) * csw: libssl_dev (Solaris) * brew: openssl@1.1 (Mac )如果openssl已经安装,请检查'pkg-config‘是否在您的路径中,以及PKG_CONFIG_PATH是否包含openssl.pc文件。如果pkg-config不可用,您可以通过以下命令手动设置INCLUDE_DIR和LIB_DIR :R INSTALL --configure-vars=‘INCLUDE_DIR... LIB_DIR=...’
我在终端中使用了命令>
sudo apt-get install libssl-dev然后它就运行得很好了。
https://stackoverflow.com/questions/35261710
复制相似问题