首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在R中安装quantmod

在R中安装quantmod
EN

Stack Overflow用户
提问于 2018-03-19 10:14:19
回答 1查看 6.3K关注 0票数 0

我试着安装R quantmod

当我尝试:

代码语言:javascript
复制
install.packages('quantmod')

我看到:

代码语言:javascript
复制
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

我也不能经营这个图书馆。

当我尝试:

代码语言:javascript
复制
install.packages("quantmod", repos="https://github.com/joshuaulrich/quantmod")

我看到:

代码语言:javascript
复制
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

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-03-19 10:48:07

看起来您需要为您的系统安装curl。打开终端并运行:

代码语言:javascript
复制
sudo apt-get update
sudo apt-get install curl libcurl4-openssl-dev libssl-dev

然后在R中再次尝试安装您的软件包:

代码语言:javascript
复制
install.packages('quantmod')

如果这不起作用,编辑你的问题,并发布任何额外的错误信息。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49360403

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档