我试着安装R quantmod
当我尝试:
install.packages('quantmod')我看到:
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
also installing the dependency ‘curl’
trying URL 'https://cloud.r-project.org/src/contrib/curl_3.1.tar.gz'
Content type 'application/x-gzip' length 366086 bytes (357 KB)
==================================================
downloaded 357 KB
trying URL 'https://cloud.r-project.org/src/contrib/quantmod_0.4-
12.tar.gz'
Content type 'application/x-gzip' length 140216 bytes (136 KB)
==================================================
downloaded 136 KB
* installing *source* package ‘curl’ ...
** package ‘curl’ successfully unpacked and MD5 sums checked
Package libcurl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcurl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcurl' found
Package libcurl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcurl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcurl' found
Using PKG_CFLAGS=
------------------------- 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 ‘/usr/local/lib/R/site-library/curl’
Warning in install.packages :
installation of package ‘curl’ had non-zero exit status
ERROR: dependency ‘curl’ is not available for package ‘quantmod’
* removing ‘/usr/local/lib/R/site-library/quantmod’
Warning in install.packages :
installation of package ‘quantmod’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpeR1Cmy/downloaded_packages’ Using PKG_LIBS=-lcurl我也不能经营这个图书馆。
当我尝试:
install.packages("quantmod", repos="https://github.com/joshuaulrich/quantmod")我看到:
Warning in install.packages :
package ‘quantmod’ is not available (for R version 3.4.4)但是R版本3.4.4是最新的!!
有什么问题吗?
P.S.我的R版本3.4.4 (2018-03-15) --“有人精益”
Linux 17.2 Rafaela
发布于 2018-03-19 10:48:07
看起来您需要为您的系统安装curl。打开终端并运行:
sudo apt-get update
sudo apt-get install curl libcurl4-openssl-dev libssl-dev然后在R中再次尝试安装您的软件包:
install.packages('quantmod')如果这不起作用,编辑你的问题,并发布任何额外的错误信息。
https://stackoverflow.com/questions/49360403
复制相似问题