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.
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.
Recently, I started to learn R language by using Rstudio, but when I tied to install some packages i had some problems.
When I try to install the "rvest" package, it give the errors as following:
> install.packages("rvest")Installing package into ‘/home/zm/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)also installing the dependencies ‘openssl’, ‘httr’
??URL’https://cran.rstudio.com/src/contrib/openssl_0.9.7.tar.gz'Content type 'application/x-gzip' length 1243577 bytes (1.2 MB)==================================================downloaded 1.2 MB
??URL’https://cran.rstudio.com/src/contrib/httr_1.3.1.tar.gz'Content type 'application/x-gzip' length 147593 bytes (144 KB)==================================================downloaded 144 KB
??URL’https://cran.rstudio.com/src/contrib/rvest_0.3.2.tar.gz'Content type 'application/x-gzip' length 1597137 bytes (1.5 MB)==================================================downloaded 1.5 MB
* installing *source* package ‘openssl’ ...** ???‘openssl’??????MD5???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/zm/R/x86_64-pc-linux-gnu-library/3.4/openssl’Warning in install.packages :
installation of package ‘openssl’ had non-zero exit statusERROR: dependency ‘openssl’ is not available for package ‘httr’* removing ‘/home/zm/R/x86_64-pc-linux-gnu-library/3.4/httr’Warning in install.packages :
installation of package ‘httr’ had non-zero exit statusERROR: dependency ‘httr’ is not available for package ‘rvest’* removing ‘/home/zm/R/x86_64-pc-linux-gnu-library/3.4/rvest’Warning in install.packages :
installation of package ‘rvest’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpuOfZU9/downloaded_packages’
I think the following is the key point of my problem:
The configuration failed because openssl wasn't found.
I tried to install:
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 also started to install the packages in Ubuntu. However, I even didn't success to install them in Ubuntu.
And I also tried the following method: export PKG_CONFIG_PATH=/cv/lib:$PKG_CONFIG_PATH
Without success..
Could somebody help me to figure out what happened, thank you very much!
I have the same problem as You.
You need to do a few thing (nuclear option but it should work):
sudo add-apt-repository 'deb
https://mirrors.nic.cz/R/bin/linux/ubuntu trusty/'
sudo apt-get update
sudo apt-get install r-base-dev
sudo apt-get install libxml2-dev
sudo apt-get install libssl-dev
sudo -i R
or if You use rstudio:
sudo -i rstudio
and in R:
install.package('rvest')
I did all above and maybe
pkg-config rvest
in a console and it worked. R shoud show during package installation some messages titled as You can see "anticonf error" and there it should be written what else should You install. My list consisted those packages.
I see that some time has passed since Your herby request, but it should be answered for the sake of next generations.
Just install libssl-dev using aptitude or apt
as stated in the error message you report.
I had the same problem of openssl not installing from rstudio on OSX when trying to install tidyverse package.
The solution for me was to try to install openssl from r prompt,
I then received instruction from the shell under "-- ANTICONF ERROR --":
> install.packages("openssl")
trying URL 'https://cloud.r-project.org/src/contrib/openssl_1.3.tar.gz'
Content type 'application/x-gzip' length 1218896 bytes (1.2 MB)
==================================================
downloaded 1.2 MB
During startup - Warning messages:
1: Setting LC_TIME failed, using "C"
2: Setting LC_MESSAGES failed, using "C"
3: Setting LC_MONETARY failed, using "C"
* installing *source* package ‘openssl’ ...
** package ‘openssl’ successfully unpacked and MD5 sums checked
Homebrew 2.0.6
Homebrew/homebrew-core (git revision 6abd; last commit 2019-03-30)
Homebrew/homebrew-cask (git revision 51ddc; last commit 2019-03-30)
Using PKG_CFLAGS=-I/usr/local/opt/openssl#1.1/include -I/usr/local/opt/openssl/include
------------------------- 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 ‘/usr/local/Cellar/r/3.5.3/lib/R/library/openssl’
For me under OSX, I just had to install openssl#1.1 using the package manager
brew install openssl#1.1
I could then install tidiverse normally from R. then use it from rstudio.
I thus believe that you should be able to install rvest from Rstudio once you will have installed libssl-dev from the shell, using something like
aptitude install libssl-dev
or similar apt command
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 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'm installing RMySQL within R terminal under CentOS 6.5 but received the following error message:
* installing to library ‘/usr/lib64/R/library’
* installing *source* package ‘RMySQL’ ...
** 成功将‘RMySQL’程序包解包并MD5和检查
Found INCLUDE_DIR and/or LIB_DIR!
Using PKG_CFLAGS=-I/usr/local/lib64/R/include/include
Using PKG_LIBS=-L/usr/local/lib64/R/lib -lmysqlclient -lz
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because mysql-connector-c was not found. Try installing:
* deb: libmysqlclient-dev | libmariadbclient-dev (Debian, Ubuntu)
* rpm: mariadb-devel | mysql-devel (Fedora, CentOS, RHEL)
* csw: mysql56_dev (Solaris)
* brew: mysql-connector-c (OSX)
If mysql-connector-c is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a mysql-connector-c.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/lib64/R/library/RMySQL’
Here's additional info:
I've installed mysql-devel as required through yum
PKG_CONFIG_PATH has been set to "/usr/lib64/pkgconfig:/usr/share/pkgconfig:/usr/local/lib/pkgconfig" however I'm unable to locate the file "mysql-connector-c.pc" on the entire system.
I've been stuck here for 2 days and would really appreciate your help and advice! Thank you!
You can search for mysql-connector-c at http://rpm.pbone.net/ to get an overview.
Note that no mysql-connector-c packages are available for CentOS. Only appears when searching Redhat EL6 and EL7.
Also be aware that none of the "mysql-connector-c-devel" packages seems to have a file "mysql-connector-c.pc"