MariaMaria1
MariaMaria1

Reputation: 25

Installation of quantmod in R

I try to install R quantmod

When I try:

install.packages('quantmod')

I see:

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

And I can't run this library.

When I try:

install.packages("quantmod", repos="https://github.com/joshuaulrich/quantmod")

I see:

Warning in install.packages :
package ‘quantmod’ is not available (for R version 3.4.4)

But R version 3.4.4 is the latest!!

What is the problem?

P.S. My R version 3.4.4 (2018-03-15) -- "Someone to Lean On"

Linux Mint 17.2 Rafaela

Upvotes: 0

Views: 8965

Answers (1)

Phil
Phil

Reputation: 4444

It looks like you need to install curl for your system. Open a terminal and run:

sudo apt-get update
sudo apt-get install curl libcurl4-openssl-dev libssl-dev

Then try again in R to install your package:

install.packages('quantmod')

If this doesn't work edit your question and post any additional error messages.

Upvotes: 1

Related Questions