Hey I tried installing swirl running the following command:
install.packages("swirl")
I got the following error:
------------------------- 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/franco/R/x86_64-pc-linux-gnu-library/3.1/curl’
Warning in install.packages :
installation of package ‘curl’ had non-zero exit status
* installing *source* package ‘RCurl’ ...
** package ‘RCurl’ successfully unpacked and MD5 sums checked
checking for curl-config... no
Cannot find curl-config
ERROR: configuration failed for package ‘RCurl’
* removing ‘/home/franco/R/x86_64-pc-linux-gnu-library/3.1/RCurl’
Warning in install.packages :
installation of package ‘RCurl’ had non-zero exit status
ERROR: dependency ‘curl’ is not available for package ‘httr’
* removing ‘/home/franco/R/x86_64-pc-linux-gnu-library/3.1/httr’
Warning in install.packages :
installation of package ‘httr’ had non-zero exit status
ERROR: dependencies ‘httr’, ‘RCurl’ are not available for package ‘swirl’
* removing ‘/home/franco/R/x86_64-pc-linux-gnu-library/3.1/swirl’
Warning in install.packages :
installation of package ‘swirl’ had non-zero exit status
The downloaded source packages are in
‘/tmp/Rtmp7G87EM/downloaded_packages’
I tried installing "curl" and "RCurl" packages but I got the same error messages. I don't know how to change the path as directed in the ANTICONF ERROR.
I'm running Ubuntu 15.04 and R version 3.1.2 (2014-10-31)
now it's
sudo apt-get install libcurl4-gnutls-dev
Updated as on 30-05-2019:
I am using Ubuntu 16.04
I got this while installing the packages-
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=...'
I used the command in terminal >
sudo apt-get install libssl-dev
And then it worked fine.
Related
I tried to install RMySQL package in my Rstudio, and when I tried it, it gave me following error
> install.packages("RMySQL")
Installing package into ‘/Users/haeseongmoon/Library/R/3.6/library’
(as ‘lib’ is unspecified)
Warning in install.packages :
unable to access index for repository https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6:
cannot open URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/PACKAGES'
Package which is only available in source form, and may need compilation of
C/C++/Fortran: ‘RMySQL’
Do you want to attempt to install these from sources? (Yes/no/cancel) Yes
installing the source package ‘RMySQL’
trying URL 'https://cran.rstudio.com/src/contrib/RMySQL_0.10.20.tar.gz'
Content type 'application/x-gzip' length 52900 bytes (51 KB)
==================================================
downloaded 51 KB
* installing *source* package ‘RMySQL’ ...
** package ‘RMySQL’ successfully unpacked and MD5 sums checked
** using staged installation
Using PKG_CFLAGS=
Using PKG_LIBS=-lmysqlclient
-----------------------------[ ANTICONF ]-----------------------------
Configure could not find suitable mysql/mariadb client library. Try installing:
* deb: libmariadbclient-dev | libmariadb-client-lgpl-dev (Debian, Ubuntu)
* rpm: mariadb-connector-c-devel | mariadb-devel | mysql-devel (Fedora, CentOS, RHEL)
* csw: mysql56_dev (Solaris)
* brew: mariadb-connector-c (OSX)
If you already have a mysql client library installed, verify that either
mariadb_config or mysql_config is on your PATH. If these are unavailable
you can also set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
--------------------------[ ERROR MESSAGE ]----------------------------
<stdin>:1:10: fatal error: 'mysql.h' file not found
#include <mysql.h>
^~~~~~~~~
1 error generated.
-----------------------------------------------------------------------
ERROR: configuration failed for package ‘RMySQL’
* removing ‘/Users/haeseongmoon/Library/R/3.6/library/RMySQL’
Warning in install.packages :
installation of package ‘RMySQL’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/c6/qgbzrx0s4zq7gdbhzz43gqhw0000gn/T/RtmpOozjqL/downloaded_packages’
I tried various solutionns that I found while I was doing googling, but it didn't workout.
How can I install RMySQL?
Thankfully, the error tells you exactly what to do.
Configure could not find suitable mysql/mariadb client library. Try installing:
* deb: libmariadbclient-dev | libmariadb-client-lgpl-dev (Debian, Ubuntu)
* rpm: mariadb-connector-c-devel | mariadb-devel | mysql-devel (Fedora, CentOS, RHEL)
* csw: mysql56_dev (Solaris)
* brew: mariadb-connector-c (OSX)
You need to use homebrew to install mariadb-connector-c.
brew install mariadb-connector-c
If you don't have homebrew yet, check out this page.
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 recently upgraded to R 3.5 and have been unable to install the 'tidyverse' package. Other packages are installing fine. Whenever I try to install tidyverse, I receive the following error message.
* installing *source* package ‘curl’ ...
** package ‘curl’ successfully unpacked and MD5 sums checked
Found pkg-config cflags and libs!
Using PKG_CFLAGS=-I/usr/include/x86_64-linux-gnu
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/nik/anaconda3/lib/R/library/curl’
ERROR: dependency ‘curl’ is not available for package ‘httr’
* removing ‘/home/nik/anaconda3/lib/R/library/httr’
ERROR: dependency ‘httr’ is not available for package ‘rvest’
* removing ‘/home/nik/anaconda3/lib/R/library/rvest’
ERROR: dependencies ‘httr’, ‘rvest’ are not available for package ‘tidyverse’
* removing ‘/home/nik/anaconda3/lib/R/library/tidyverse’
The downloaded source packages are in
‘/tmp/RtmpHJ48Sk/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning messages:
1: In install.packages("tidyverse") :
installation of package ‘curl’ had non-zero exit status
2: In install.packages("tidyverse") :
installation of package ‘httr’ had non-zero exit status
3: In install.packages("tidyverse") :
installation of package ‘rvest’ had non-zero exit status
4: In install.packages("tidyverse") :
installation of package ‘tidyverse’ had non-zero exit status
I have run sudo apt-get install libcurl4-openssl-dev as has been suggested on other threads for the same problem. However, this does not appear to resolve the issue (in fact, libcurl was already installed, and reinstalling it also did not work).
When I check $PATH, I do not see 'pkg-config', and PKG_CONFIG_PATH does not seem to exist. Adding /usr/bin/pkg-config to the path and setting PKG_CONFIG_PATH /home/nik/anaconda3/lib/pkgconfig/libcurl.pc also does not appear to have fixed the issue. I'm at wits end at this point, as I can't think of anything else to uninstall/reinstall, nor figure out why libcurl isn't being added to the path on its own when I install it. Any help at all would be appreciated.
try setting your path to the directory that contains libcurl and not to libcurl itself, i.e.
PKG_CONFIG_PATH=/home/nik/anaconda3/lib/pkgconfig
I am trying to install swirl in R ver 3.4.1 32-bit on Debian wheezyx and am getting errors. Please see below:
------------------------- 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'
* installing *source* package 'openssl' ...
** package 'openssl' successfully unpacked and MD5 sums
checked
Found pkg-config cflags and libs!
Using PKG_CFLAGS=
Using PKG_LIBS=-lssl -lcrypto
------------------------- 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=...'
--------------------------------------------------------------------
I then tried to install libcurl4-openssl-dev but get the following error. I'm not sure what to do next...
> install.packages("libcurl4-openssl-dev")
Installing package into '/usr/local/lib/R/site-library'
(as 'lib' is unspecified)
Warning message:
package 'libcurl4-openssl-dev' is not available (for R version 3.4.1)
>
I tried to install libcurl4-openssl-dev as a Debian package and this is the output I received.
Setting up dropbear (2014.65-1+deb8u2) ...
Restarting Dropbear SSH server: invoke-rc.d: initscript
dropbear, action "restart" failed.
dpkg: error processing package dropbear (--
configure):
subprocess installed post-installation script returned
error exit status 1
Errors were encountered while processing:
dropbear
E: Sub-process /usr/bin/dpkg returned an error code
(1)
After I run the package the issue still exist.
First try from the terminal:
sudo apt-get install libcurl4-openssl-dev libssl-dev
later go back to Rstudio and install swirl package again.
I am finding it very difficult to install the "RMySQL" package on CENTOS.
install.packages("RMySQL", dependencies = TRUE, repos = "http://cran.rstudio.com/")
The error it is throwing me is:
* installing *source* package ‘RMySQL’ ...
** package ‘RMySQL’ successfully unpacked and MD5 sums checked
Using PKG_CFLAGS=
Using PKG_LIBS=-lmysqlclient
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libmysqlclient was not found. Try installing:
* deb: libmariadb-client-lgpl-dev (Debian, Ubuntu 16.04)
libmariadbclient-dev (Ubuntu 14.04)
* rpm: mariadb-devel | mysql-devel (Fedora, CentOS, RHEL)
* csw: mysql56_dev (Solaris)
* brew: mariadb-connector-c (OSX)
If libmysqlclient is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libmysqlclient.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 ‘RMySQL’
* removing ‘/usr/local/lib64/R/library/RMySQL’
The downloaded source packages are in
‘/tmp/RtmpbFMPmO/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("RMySQL", dependencies = TRUE, repos = "http://cran.rstudio.com/") :
installation of package ‘RMySQL’ had non-zero exit status
I have already installed yum update mysql-devel but still get the same error.
Any help will be appreciated as I have been trying to figure his out since last 2 days.