Trying to install R package ggiraph on my Mac OS X I ran into a problem with dependency xml2.
This seems to be a fairly common problem for users of this and other packages so after reading threads here and elsewhere I confirmed the following:
RStudio, R, and all its packages are up do date
libxml2 is installed in developer version, using homebrew
I have copied libxml-2.0.pc from homebrew folder to /usr/local/lib/pkgconfig/
I have added /usr/local/lib/pkgconfig/ to PATH and PKG_CONFIG_PATH
I still get the below error message during installation. Thankful for help!
> install.packages("ggiraph")
Installing package into ‘/usr/local/lib/R/3.5/site-library’
(as ‘lib’ is unspecified)
also installing the dependency ‘xml2’
trying URL 'https://cran.rstudio.com/src/contrib/xml2_1.2.0.tar.gz'
Content type 'application/x-gzip' length 251614 bytes (245 KB)
==================================================
downloaded 245 KB
trying URL 'https://cran.rstudio.com/src/contrib/ggiraph_0.6.0.tar.gz'
Content type 'application/x-gzip' length 208710 bytes (203 KB)
==================================================
downloaded 203 KB
* installing *source* package ‘xml2’ ...
** package ‘xml2’ successfully unpacked and MD5 sums checked
Found pkg-config cflags and libs!
Using PKG_CFLAGS=-I/usr/include/libxml2
Using PKG_LIBS=-L/usr/lib -lxml2 -lz -lpthread -licucore -lm
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libxml-2.0 was not found. Try installing:
* deb: libxml2-dev (Debian, Ubuntu, etc)
* rpm: libxml2-devel (Fedora, CentOS, RHEL)
* csw: libxml2_dev (Solaris)
If libxml-2.0 is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libxml-2.0.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 ‘xml2’
* removing ‘/usr/local/lib/R/3.5/site-library/xml2’
Warning in install.packages :
installation of package ‘xml2’ had non-zero exit status
ERROR: dependency ‘xml2’ is not available for package ‘ggiraph’
* removing ‘/usr/local/lib/R/3.5/site-library/ggiraph’
Warning in install.packages :
installation of package ‘ggiraph’ had non-zero exit status
This is a recurrent problem I have on macOS with Homebrew and libxml2. The includes of libxml2 are located in a subdirectory /path/to/includes/libxml2/libxml/ which can't be found by compilers.
I successfully installed xml2 in R doing two things:
Create symlink [...]/include/libxml pointing to [...]/include/libxml2/libxml
Add the include folder path to INCLUDE_DIR
Do point 1 in a terminal. Although filepath may be different on your installation, the shell command on my mac was:
Bash > ln -s /usr/local/Cellar/libxml2/2.9.9_2/include/libxml2/libxml /usr/local/Cellar/libxml2/2.9.9_2/include/libxml`
Do point 2 in RStudio's R Terminal. The command on my mac was:
R > Sys.setenv(INCLUDE_DIR = paste("/usr/local/Cellar/libxml2/2.9.9_2/include", Sys.getenv("INCLUDE_DIR"), sep = ":"))`
Then install xml2 and ultimately ggiraph:
R > install.packages(c("xml2", "ggiraph"))
Related
Introduction
OS: Ubuntu 20.04.3 LTS
I am currently install the languageserver packages on R, to use the R VS Code extension.
Problematic
But when I execute the install.packages("languageserver") in R with the Ubuntu's terminal, I have this error:
> install.packages("languageserver")
Installing package into ‘/home/mathieu-s/R/x86_64-pc-linux-gnu-library/4.1’
(as ‘lib’ is unspecified)
also installing the dependencies ‘curl’, ‘httr’, ‘lintr’
trying URL 'https://cloud.r-project.org/src/contrib/curl_4.3.2.tar.gz'
Content type 'application/x-gzip' length 793345 bytes (774 KB)
==================================================
downloaded 774 KB
trying URL 'https://cloud.r-project.org/src/contrib/httr_1.4.2.tar.gz'
Content type 'application/x-gzip' length 159950 bytes (156 KB)
==================================================
downloaded 156 KB
trying URL 'https://cloud.r-project.org/src/contrib/lintr_2.0.1.tar.gz'
Content type 'application/x-gzip' length 219142 bytes (214 KB)
==================================================
downloaded 214 KB
trying URL 'https://cloud.r-project.org/src/contrib/languageserver_0.3.12.tar.gz'
Content type 'application/x-gzip' length 78124 bytes (76 KB)
==================================================
downloaded 76 KB
* installing *source* package ‘curl’ ...
** package ‘curl’ successfully unpacked and MD5 sums checked
** using staged installation
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=
Using PKG_LIBS=-lcurl
------------------------- 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/mathieu-s/R/x86_64-pc-linux-gnu-library/4.1/curl’
ERROR: dependency ‘curl’ is not available for package ‘httr’
* removing ‘/home/mathieu-s/R/x86_64-pc-linux-gnu-library/4.1/httr’
ERROR: dependency ‘httr’ is not available for package ‘lintr’
* removing ‘/home/mathieu-s/R/x86_64-pc-linux-gnu-library/4.1/lintr’
ERROR: dependency ‘lintr’ is not available for package ‘languageserver’
* removing ‘/home/mathieu-s/R/x86_64-pc-linux-gnu-library/4.1/languageserver’
The downloaded source packages are in
‘/tmp/RtmpVaqLTX/downloaded_packages’
Warning messages:
1: In install.packages("languageserver") :
installation of package ‘curl’ had non-zero exit status
2: In install.packages("languageserver") :
installation of package ‘httr’ had non-zero exit status
3: In install.packages("languageserver") :
installation of package ‘lintr’ had non-zero exit status
4: In install.packages("languageserver") :
installation of package ‘languageserver’ had non-zero exit status
But I don't know how to solve this error, can someone help me to solve this?
you should install libcurl4-openssl-dev in Ubuntu, try the following codes in Ubuntu terminal:
sudo apt update
sudo apt-get install libcurl4-openssl-dev
then try again to install languageserver package in R
I'm trying to run my web scraper on a raspberry pi but keep failing. I have never worked with Linux so my problem is probably pretty basic.
When I open R and type install.packages('rvest') it always gives me the same error.
What am I doing wrong?
install.packages('rvest')
Installing package into ‘/home/pi/R/arm-unknown-linux-gnueabihf-library/3.5’
(as ‘lib’ is unspecified)
also installing the dependencies ‘curl’, ‘openssl’, ‘xml2’, ‘httr’
trying URL 'https://cloud.r-project.org/src/contrib/curl_4.3.tar.gz'
Content type 'application/x-gzip' length 673779 bytes (657 KB)
==================================================
downloaded 657 KB
trying URL 'https://cloud.r-project.org/src/contrib/openssl_1.4.1.tar.gz'
Content type 'application/x-gzip' length 1206885 bytes (1.2 MB)
==================================================
downloaded 1.2 MB
trying URL 'https://cloud.r-project.org/src/contrib/xml2_1.3.2.tar.gz'
Content type 'application/x-gzip' length 271876 bytes (265 KB)
==================================================
downloaded 265 KB
trying URL 'https://cloud.r-project.org/src/contrib/httr_1.4.1.tar.gz'
Content type 'application/x-gzip' length 158465 bytes (154 KB)
==================================================
downloaded 154 KB
trying URL 'https://cloud.r-project.org/src/contrib/rvest_0.3.5.tar.gz'
Content type 'application/x-gzip' length 1129355 bytes (1.1 MB)
==================================================
downloaded 1.1 MB
* 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=
Using PKG_LIBS=-lcurl
------------------------- 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/pi/R/arm-unknown-linux-gnueabihf-library/3.5/curl’
* installing *source* package ‘openssl’ ...
** package ‘openssl’ successfully unpacked and MD5 sums checked
Using PKG_CFLAGS=
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because openssl was not found. Try installing:
* deb: libssl-dev (Debian, Ubuntu, etc)
* rpm: openssl-devel (Fedora, CentOS, RHEL)
* csw: libssl_dev (Solaris)
* brew: openssl#1.1 (Mac OSX)
If openssl is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a openssl.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 ‘openssl’
* removing ‘/home/pi/R/arm-unknown-linux-gnueabihf-library/3.5/openssl’
* installing *source* package ‘xml2’ ...
** package ‘xml2’ successfully unpacked and MD5 sums checked
Package libxml-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libxml-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libxml-2.0' found
Package libxml-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libxml-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libxml-2.0' found
Using PKG_CFLAGS=
Using PKG_LIBS=-lxml2
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libxml-2.0 was not found. Try installing:
* deb: libxml2-dev (Debian, Ubuntu, etc)
* rpm: libxml2-devel (Fedora, CentOS, RHEL)
* csw: libxml2_dev (Solaris)
If libxml-2.0 is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libxml-2.0.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 ‘xml2’
* removing ‘/home/pi/R/arm-unknown-linux-gnueabihf-library/3.5/xml2’
ERROR: dependencies ‘curl’, ‘openssl’ are not available for package ‘httr’
* removing ‘/home/pi/R/arm-unknown-linux-gnueabihf-library/3.5/httr’
ERROR: dependencies ‘xml2’, ‘httr’ are not available for package ‘rvest’
* removing ‘/home/pi/R/arm-unknown-linux-gnueabihf-library/3.5/rvest’
The downloaded source packages are in
‘/tmp/RtmpOJHXRP/downloaded_packages’
Warning messages:
1: In install.packages("rvest") :
installation of package ‘curl’ had non-zero exit status
2: In install.packages("rvest") :
installation of package ‘openssl’ had non-zero exit status
3: In install.packages("rvest") :
installation of package ‘xml2’ had non-zero exit status
4: In install.packages("rvest") :
installation of package ‘httr’ had non-zero exit status
5: In install.packages("rvest") :
installation of package ‘rvest’ had non-zero exit status
(StackOverflow says my post is mostly code and that I should add some more words which makes absolutely no sense because it's a short question concerning a long code. So, here are some German words I just found in letters on my desktop (mostly stupid bills):
- Empfangsquittung
- Nebenkostenabrechnung
- Promilleanteil-Abrechnung
- Zusatzleistungsbarcodes
- Liegenschaftsverwaltung
- Rückforderungsbeleg
)
It says, libcurl is missing. So, install it:
apt install -y libcurl4-openssl-dev
I am totally new to R.
I tried to install the httr package.
I first installed pacman, and then tried to load httr through it by running pacman::p_load(httr).
It wasn't successful. And it showed the following message in terminal-
Installing package into
‘/home/|username|/R/x86_64-pc-linux-gnu-library/3.6’ (as ‘lib’ is
unspecified) also installing the dependencies ‘curl’, ‘openssl’
trying URL 'https://cloud.r-project.org/src/contrib/curl_4.3.tar.gz'
Content type 'application/x-gzip' length 673779 bytes (657 KB)
================================================== downloaded 657 KB
trying URL
'https://cloud.r-project.org/src/contrib/openssl_1.4.1.tar.gz' Content
type 'application/x-gzip' length 1206885 bytes (1.2 MB)
================================================== downloaded 1.2 MB
trying URL 'https://cloud.r-project.org/src/contrib/httr_1.4.1.tar.gz'
Content type 'application/x-gzip' length 158465 bytes (154 KB)
================================================== downloaded 154 KB
installing source package ‘curl’ ...
** package ‘curl’ successfully unpacked and MD5 sums checked
** using staged installation 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
containinglibcurl.pc' to the PKG_CONFIG_PATH environment variable No
package 'libcurl' found Using PKG_CFLAGS= Using PKG_LIBS=-lcurl
------------------------- 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/|username|/R/x86_64-pc-linux-gnu-library/3.6/curl’
installing source package ‘openssl’ ...
** package ‘openssl’ successfully unpacked and MD5 sums checked
** using staged installation Using PKG_CFLAGS=
------------------------- ANTICONF ERROR --------------------------- Configuration failed because openssl was not found. Try installing: *
deb: libssl-dev (Debian, Ubuntu, etc) * rpm: openssl-devel (Fedora,
CentOS, RHEL) * csw: libssl_dev (Solaris) * brew: openssl#1.1 (Mac
OSX) If openssl is already installed, check that 'pkg-config' is in
your PATH and PKG_CONFIG_PATH contains a openssl.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 ‘openssl’
removing ‘/home/|username|/R/x86_64-pc-linux-gnu-library/3.6/openssl’ ERROR: dependencies ‘curl’, ‘openssl’ are not available for package
‘httr’
removing ‘/home/|username|/R/x86_64-pc-linux-gnu-library/3.6/httr’
The downloaded source packages are in
‘/tmp/Rtmp3wZaOu/downloaded_packages’ Warning messages: 1: In
utils::install.packages(package, ...) : installation of package
‘curl’ had non-zero exit status 2: In utils::install.packages(package,
...) : installation of package ‘openssl’ had non-zero exit status 3:
In utils::install.packages(package, ...) : installation of package
‘httr’ had non-zero exit status 4: In p_install(package,
character.only = TRUE, ...) : 5: In library(package, lib.loc =
lib.loc, character.only = TRUE, logical.return = TRUE, : there is
no package called ‘httr’ 6: In pacman::p_load(httr) : Failed to
install/load: httr
How do I solve this?
Note: I have installed several other external packages through pacman. Like- dplyr, ggplot2 etc.
httr imports openssl (https://cran.r-project.org/web/packages/openssl/index.html) and curl (https://cran.r-project.org/web/packages/curl/index.html)
and both are specific system requirements. For openssl "SystemRequirements: OpenSSL >= 1.0.1" and for curl "SystemRequirements: libcurl: libcurl-devel (rpm) or libcurl4-openssl-dev (deb)."
I just installed ubunutu 18.04 and I successfully install R version 3.5.1. I am having problems installing R packages such as plotly. It seems that the packages curl and httr are not available. The full error message:
> install.packages("plotly")
Installing package into ‘/home/lualeperez/R/x86_64-pc-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
also installing the dependencies ‘curl’, ‘openssl’, ‘httr’
trying URL 'https://cloud.r-project.org/src/contrib/curl_3.2.tar.gz'
Content type 'application/x-gzip' length 367047 bytes (358 KB)
==================================================
downloaded 358 KB
trying URL 'https://cloud.r-project.org/src/contrib/openssl_1.0.2.tar.gz'
Content type 'application/x-gzip' length 1194883 bytes (1.1 MB)
==================================================
downloaded 1.1 MB
trying URL 'https://cloud.r-project.org/src/contrib/httr_1.3.1.tar.gz'
Content type 'application/x-gzip' length 147593 bytes (144 KB)
==================================================
downloaded 144 KB
trying URL 'https://cloud.r-project.org/src/contrib/plotly_4.8.0.tar.gz'
Content type 'application/x-gzip' length 1860673 bytes (1.8 MB)
==================================================
downloaded 1.8 MB
* 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=
Using PKG_LIBS=-lcurl
------------------------- 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/lualeperez/R/x86_64-pc-linux-gnu-library/3.5/curl’
* installing *source* package ‘openssl’ ...
** package ‘openssl’ successfully unpacked and MD5 sums checked
Using PKG_CFLAGS=
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because openssl was not found. Try installing:
* deb: libssl-dev (Debian, Ubuntu, etc)
* rpm: openssl-devel (Fedora, CentOS, RHEL)
* csw: libssl_dev (Solaris)
* brew: openssl#1.1 (Mac OSX)
If openssl is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a openssl.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 ‘openssl’
* removing ‘/home/lualeperez/R/x86_64-pc-linux-gnu-library/3.5/openssl’
ERROR: dependencies ‘curl’, ‘openssl’ are not available for package ‘httr’
* removing ‘/home/lualeperez/R/x86_64-pc-linux-gnu-library/3.5/httr’
ERROR: dependency ‘httr’ is not available for package ‘plotly’
* removing ‘/home/lualeperez/R/x86_64-pc-linux-gnu-library/3.5/plotly’
The downloaded source packages are in
‘/tmp/RtmpNTZBPJ/downloaded_packages’
Warning messages:
1: In install.packages("plotly") :
installation of package ‘curl’ had non-zero exit status
2: In install.packages("plotly") :
installation of package ‘openssl’ had non-zero exit status
3: In install.packages("plotly") :
installation of package ‘httr’ had non-zero exit status
4: In install.packages("plotly") :
installation of package ‘plotly’ had non-zero exit status
I tried to solve the problem by installing libcurl4 by doing
sudo apt-get install libcurl4
but the systems then removes all the r-base dependencies.
I haven't tried to solve the problem with the httr package.
Does any one have any hint on how to solve this problem?
Just ran into the same issue, this is the solution I found:
Since just installing libcurl4-openssl-dev removes all the r-base packages what I did was
sudo apt-get install libcurl4-openssl-dev r-base
and afterwards
R -q -e "install.packages(c('curl'))"
and it worked.
Only caveat is that it upgrades your R version, but if you are already using the latest one then its not an issue.
You are attempting to compile from source. That sometimes has so-called build dependencies. You are missing them, and you are overlooking the (somewhat clear) error messages to that extend because you are getting swamped by multiple installations.
So first tip, so it one package at a time.
Second tip: realize that many (if not all) of these are available within Ubuntu. So just do
sudo apt install r-cran-curl
to install e.g. curl. Ditto for the others.
Third tip: There are over 3000 CRAN packages for Ubuntu at Michael's PPA. Read the top of
this README and then go this PPA (provided you want 3.5 which you do).
Fedora 36:
dnf install cmake
dnf install openssl-devel
dnf install libcurl-devel.x86_64
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
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.