I'm running R version 3.2 because it is a requirement for ggplots2.
However it seems that I cannot install package "Quandl".
I'm getting the following warnings:
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)
and some others. The result is:
Warning in install.packages :
installation of package ‘Quandl’ had non-zero exit status
My assumption is that the newer R version is not yet supported by the required dependency.
What should I do?
You need to install libcurl4-openssl-dev operating system package. You can use this command on Debian-based OS (including Ubuntu and Mint):
sudo apt-get install libcurl4-openssl-dev
Related
I am trying to pull some json data from a remote server using fromJSON:
> server <- 'http://111.111.000.00:3000'
> streams <- fromJSON(paste(server, '/output/streams', sep=""), flatten=TRUE)
Result:
Error: Required package curl not found.
Please run: install.packages('curl')
So I tried to install it:
> install.packages("curl")
Installing package into ‘/home/lauxxx/R/x86_64-pc-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/curl_2.3.tar.gz'
Content type 'application/x-gzip' length 400460 bytes (391 KB)
==================================================
downloaded 391 KB
* installing *source* package ‘curl’ ...
** package ‘curl’ successfully unpacked and MD5 sums checked
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/lauxxx/R/x86_64-pc-linux-gnu-library/3.3/curl’
Warning in install.packages :
installation of package ‘curl’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpdoavNf/downloaded_packages’
Then I tried to install libcurl4-openssl-dev:
> install.packages("libcurl4-openssl-dev")
Installing package into ‘/home/lau/R/x86_64-pc-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘libcurl4-openssl-dev’ is not available (for R version 3.3.1)
Why? What is going wrong? How can I fix it?
It was ok when I was on Xubuntu 16.04. But now I am on Kubuntu 16.10.
Any ideas?
libcurl4-openssl-dev is not a R package, but rather a linux library.
In a console type:
sudo apt-get install libcurl4-openssl-dev
Note: you need sudo powers.
The Linux release is: CentOS Linux release 7.3.1611 (Core)
In my case, I was trying to install R package: devtools
------------------------- 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=...'
I checked $PATH, 'pkg-config' was in the PATH. But there is no libcurl.pc file in PKG_CONFIG_PATH (/usr/local/lib/pkgconfig/).
Here is how I solved the problem.
su
wget https://github.com/curl/curl/releases/download/curl-7_55_0/curl-7.55.0.tar.gz
./configure
make
make install
After this, I saw libcurl.pc file in PKG_CONFIG_PATH (/usr/local/lib/pkgconfig/).
I got this error on Ubuntu Server 18.04, despite already having the libcurl4-openssl-dev apt package installed. I had to look up where the package installs libcurl.pc to figure out the command to use:
wget <curl-package-address>
R CMD INSTALL --configure-vars='LIB_DIR=/usr/lib/x86_64-linux-gnu/pkgconfig' <curl-file.gz>
(Check the messages above the "ANTICONF ERROR" for the right file to download and install. For the questioner it was https://cran.rstudio.com/src/contrib/curl_2.3.tar.gz; mine was https://cloud.r-project.org/src/contrib/curl_4.3.tar.gz.)
Just ran into this issue when using GitHub actions to run a R script on a cron schedule.
Popping sudo apt-get install libcurl4-openssl-dev into system() within the R file works. Much easier then setting up the bash command on the runner separately.
system("sudo apt-get install libcurl4-openssl-dev")
------------------------- 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)
I ran into this issue when install an R package in Fedora Workstation 33. Following the hints, be sure to install libcurl-devel for the appropriate architecture, in this case libcurl-devel.x86_64:
sudo dnf install openssl-dev libcurl-devel.x86_64
If you are using conda environment, the following command will resolve the issue.
conda install -c conda-forge r-curl
In my case of Ubuntu 18, none of these solutions worked from within Rstudio.
When I finally decided to run R from the command line, success -- I couldn't tell you which 'solution' was the key because by this point I've already tried all of them.
Note that if I try to run Rstudio again, any attempt to install will still fail.
Thus there may be some issue with Rstudio not inferring the environment properly.
I am trying to pull some json data from a remote server using fromJSON:
> server <- 'http://111.111.000.00:3000'
> streams <- fromJSON(paste(server, '/output/streams', sep=""), flatten=TRUE)
Result:
Error: Required package curl not found.
Please run: install.packages('curl')
So I tried to install it:
> install.packages("curl")
Installing package into ‘/home/lauxxx/R/x86_64-pc-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/curl_2.3.tar.gz'
Content type 'application/x-gzip' length 400460 bytes (391 KB)
==================================================
downloaded 391 KB
* installing *source* package ‘curl’ ...
** package ‘curl’ successfully unpacked and MD5 sums checked
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/lauxxx/R/x86_64-pc-linux-gnu-library/3.3/curl’
Warning in install.packages :
installation of package ‘curl’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpdoavNf/downloaded_packages’
Then I tried to install libcurl4-openssl-dev:
> install.packages("libcurl4-openssl-dev")
Installing package into ‘/home/lau/R/x86_64-pc-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘libcurl4-openssl-dev’ is not available (for R version 3.3.1)
Why? What is going wrong? How can I fix it?
It was ok when I was on Xubuntu 16.04. But now I am on Kubuntu 16.10.
Any ideas?
libcurl4-openssl-dev is not a R package, but rather a linux library.
In a console type:
sudo apt-get install libcurl4-openssl-dev
Note: you need sudo powers.
The Linux release is: CentOS Linux release 7.3.1611 (Core)
In my case, I was trying to install R package: devtools
------------------------- 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=...'
I checked $PATH, 'pkg-config' was in the PATH. But there is no libcurl.pc file in PKG_CONFIG_PATH (/usr/local/lib/pkgconfig/).
Here is how I solved the problem.
su
wget https://github.com/curl/curl/releases/download/curl-7_55_0/curl-7.55.0.tar.gz
./configure
make
make install
After this, I saw libcurl.pc file in PKG_CONFIG_PATH (/usr/local/lib/pkgconfig/).
I got this error on Ubuntu Server 18.04, despite already having the libcurl4-openssl-dev apt package installed. I had to look up where the package installs libcurl.pc to figure out the command to use:
wget <curl-package-address>
R CMD INSTALL --configure-vars='LIB_DIR=/usr/lib/x86_64-linux-gnu/pkgconfig' <curl-file.gz>
(Check the messages above the "ANTICONF ERROR" for the right file to download and install. For the questioner it was https://cran.rstudio.com/src/contrib/curl_2.3.tar.gz; mine was https://cloud.r-project.org/src/contrib/curl_4.3.tar.gz.)
Just ran into this issue when using GitHub actions to run a R script on a cron schedule.
Popping sudo apt-get install libcurl4-openssl-dev into system() within the R file works. Much easier then setting up the bash command on the runner separately.
system("sudo apt-get install libcurl4-openssl-dev")
------------------------- 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)
I ran into this issue when install an R package in Fedora Workstation 33. Following the hints, be sure to install libcurl-devel for the appropriate architecture, in this case libcurl-devel.x86_64:
sudo dnf install openssl-dev libcurl-devel.x86_64
If you are using conda environment, the following command will resolve the issue.
conda install -c conda-forge r-curl
In my case of Ubuntu 18, none of these solutions worked from within Rstudio.
When I finally decided to run R from the command line, success -- I couldn't tell you which 'solution' was the key because by this point I've already tried all of them.
Note that if I try to run Rstudio again, any attempt to install will still fail.
Thus there may be some issue with Rstudio not inferring the environment properly.
I am trying to pull some json data from a remote server using fromJSON:
> server <- 'http://111.111.000.00:3000'
> streams <- fromJSON(paste(server, '/output/streams', sep=""), flatten=TRUE)
Result:
Error: Required package curl not found.
Please run: install.packages('curl')
So I tried to install it:
> install.packages("curl")
Installing package into ‘/home/lauxxx/R/x86_64-pc-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/curl_2.3.tar.gz'
Content type 'application/x-gzip' length 400460 bytes (391 KB)
==================================================
downloaded 391 KB
* installing *source* package ‘curl’ ...
** package ‘curl’ successfully unpacked and MD5 sums checked
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/lauxxx/R/x86_64-pc-linux-gnu-library/3.3/curl’
Warning in install.packages :
installation of package ‘curl’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpdoavNf/downloaded_packages’
Then I tried to install libcurl4-openssl-dev:
> install.packages("libcurl4-openssl-dev")
Installing package into ‘/home/lau/R/x86_64-pc-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘libcurl4-openssl-dev’ is not available (for R version 3.3.1)
Why? What is going wrong? How can I fix it?
It was ok when I was on Xubuntu 16.04. But now I am on Kubuntu 16.10.
Any ideas?
libcurl4-openssl-dev is not a R package, but rather a linux library.
In a console type:
sudo apt-get install libcurl4-openssl-dev
Note: you need sudo powers.
The Linux release is: CentOS Linux release 7.3.1611 (Core)
In my case, I was trying to install R package: devtools
------------------------- 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=...'
I checked $PATH, 'pkg-config' was in the PATH. But there is no libcurl.pc file in PKG_CONFIG_PATH (/usr/local/lib/pkgconfig/).
Here is how I solved the problem.
su
wget https://github.com/curl/curl/releases/download/curl-7_55_0/curl-7.55.0.tar.gz
./configure
make
make install
After this, I saw libcurl.pc file in PKG_CONFIG_PATH (/usr/local/lib/pkgconfig/).
I got this error on Ubuntu Server 18.04, despite already having the libcurl4-openssl-dev apt package installed. I had to look up where the package installs libcurl.pc to figure out the command to use:
wget <curl-package-address>
R CMD INSTALL --configure-vars='LIB_DIR=/usr/lib/x86_64-linux-gnu/pkgconfig' <curl-file.gz>
(Check the messages above the "ANTICONF ERROR" for the right file to download and install. For the questioner it was https://cran.rstudio.com/src/contrib/curl_2.3.tar.gz; mine was https://cloud.r-project.org/src/contrib/curl_4.3.tar.gz.)
Just ran into this issue when using GitHub actions to run a R script on a cron schedule.
Popping sudo apt-get install libcurl4-openssl-dev into system() within the R file works. Much easier then setting up the bash command on the runner separately.
system("sudo apt-get install libcurl4-openssl-dev")
------------------------- 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)
I ran into this issue when install an R package in Fedora Workstation 33. Following the hints, be sure to install libcurl-devel for the appropriate architecture, in this case libcurl-devel.x86_64:
sudo dnf install openssl-dev libcurl-devel.x86_64
If you are using conda environment, the following command will resolve the issue.
conda install -c conda-forge r-curl
In my case of Ubuntu 18, none of these solutions worked from within Rstudio.
When I finally decided to run R from the command line, success -- I couldn't tell you which 'solution' was the key because by this point I've already tried all of them.
Note that if I try to run Rstudio again, any attempt to install will still fail.
Thus there may be some issue with Rstudio not inferring the environment properly.
I am trying to install RCurl. But getting following error while installing:
checking for curl-config... no
Cannot find curl-config
ERROR: configuration failed for package ‘RCurl’
So tried installing libcurl4-openssl-dev on my Redhat 6 server.
But getting
No package libcurl4-openssl-dev available.
I have already installed curl and libcurl-devel.
I'm trying to install devtools in a PowerPC with a R version 3.1.1 but failed at the end because the curl library:
...
** testing if installed package can be loaded Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/path
to/R/powerpc-unknown-linux-gnu-library/3.1/curl/libs/curl.so': /path
to/R/powerpc-unknown-linux-gnu-library/3.1/curl/libs/curl.so:
undefined symbol: BSWAP_32 Error: loading failed Execution halted
ERROR: loading failed
* removing ‘/path to/R/powerpc-unknown-linux-gnu-library/3.1/curl’ ERROR: dependency ‘curl’ is not available for package ‘httr’
* removing ‘/path to/R/powerpc-unknown-linux-gnu-library/3.1/httr’ ERROR: dependency ‘curl’ is not available for package ‘rversions’
* removing ‘/path to/R/powerpc-unknown-linux-gnu-library/3.1/rversions’ ERROR:
dependencies ‘httr’, ‘rversions’ are not available for package
‘devtools’
* removing ‘/path to/R/powerpc-unknown-linux-gnu-library/3.1/devtools’
The downloaded source packages are in
‘/tmp/RtmpD0yE63/downloaded_packages’ Warning messages: 1: In
install.packages("devtools") : installation of package ‘curl’ had
non-zero exit status 2: In install.packages("devtools") :
installation of package ‘httr’ had non-zero exit status 3: In
install.packages("devtools") : installation of package ‘rversions’
had non-zero exit status 4: In install.packages("devtools") :
installation of package ‘devtools’ had non-zero exit status
I've already installed libcurl4-gnutls-dev and libcurl4-openssl-dev and the libcurl version is 7.38.0.
Does anyone know a fix to this? Thanks ;)
The same problem happened to me when I was trying to install "devtools" package on a new machine with Ubuntu 16.04 system.
I tried many answers including the adopted one above, but I still couldn't solve the problem until I noticed another warning information "(as ‘lib’ is unspecified)". Then I realized that I was running R as a normal user while the R base is installed by root. It means the package "devtools" couldn't be installed into the default R library folder and possibly couldn't use some dependent packages. Then the solution became very easy: run R as root user and then install "devtools".
Following the instructions of Dean Attali (https://www.digitalocean.com/community/tutorials/how-to-set-up-r-on-ubuntu-14-04), I summarize the steps below. Just run them in a terminal.
$ sudo apt-get -y install libcurl4-gnutls-dev libxml2-dev libssl-dev
$ sudo su
$ R
> install.packages('devtools', repos='http://cran.rstudio.com/')
That's it. Since the package is installed by root, it can be used by all users of the system.
For Curl use:
apt-get -y build-dep libcurl4-gnutls-dev
apt-get -y install libcurl4-gnutls-dev
And you should update the R version to R-3.1.2
wget http://cran.r-project.org/src/base/R-3/R-3.1.2.tar.gz
I m using Ubuntu 16.04 and this is how I solved this issue:
aptitude install libssl-dev
then aptitude packg manage will allow you to choose the right version which is required for installation of devtools.
Repeat the same for
aptitude libcurl4-gnutls-dev
aptitude libxml2-dev
Finally, install this libgit2 lib
devtools::install_github('ropensci/git2r')
devtools::load_all()
R CMD INSTALL git2r
I could not solve it with apt-get packg manager. Thats all :) !
This error was happening when I was using 3.0.2. I updated the R, now It is fine. I also spent the one day to find the solution. I tried the all the solution. But, no effect. I updated the R using this solution. Now, devtools package is working.
Fedora 34
What did it for me was:
sudo dnf groupinstall "Development tools"
Not sure about that, but also:
sudo dnf install freetype-devel libpng-devel libtiff-devel libjpeg-turbo-devel
Don't know, don't care, but it worked!