I am trying to install RMySQL
in Ubuntu through R studio, but I am running into this error below. Can someone help me resolve this please.
Installing package into ‘/R_latest/lib/R/library’
(as ‘lib’ is unspecified)
--2015-11-18 11:40:26-- https://cran.rstudio.com/src/contrib/RMySQL_0.10.7.tar.gz
Resolving cran.rstudio.com (cran.rstudio.com)... 54.230.132.47
Connecting to cran.rstudio.com (cran.rstudio.com)|54.230.132.47|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 52422 (51K) [application/x-gzip]
Saving to: '/tmp/Rtmp52166B/downloaded_packages/RMySQL_0.10.7.tar.gz’
0K .......... .......... .......... .......... .......... 97% 1.73M 0s
50K . 100% 2276G=0.03s
2015-11-18 11:40:26 (1.77 MB/s) - '/tmp/Rtmp52166B/downloaded_packages/RMySQL_0.10.7.tar.gz’ saved [52422/52422]
* installing *source* package ‘RMySQL’ ...
** package ‘RMySQL’ successfully unpacked and MD5 sums checked
Using PKG_CFLAGS=
Using PKG_LIBS=-lmysqlclient -lz
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libmysqlclient was not found. Try installing:
* deb: libmysqlclient-dev | libmariadb-client-lgpl-dev (Debian)
libmysqlclient-dev | libmariadbclient-dev (Ubuntu)
* rpm: mariadb-devel | mysql-devel (Fedora, CentOS, RHEL)
* csw: mysql56_dev (Solaris)
* brew: mysql-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=...'
--------------------------------------------------------------------
install.packages('RMySQL',type='source')
ERROR: configuration failed for package ‘RMySQL’
* removing ‘/R_latest/lib/R/library/RMySQL’
Warning in install.packages :
installation of package ‘RMySQL’ had non-zero exit status
The downloaded source packages are in
‘/tmp/Rtmp52166B/downloaded_packages’
Just do
sudo apt-get install r-cran-rmysql
as we do have an Ubuntu package RMySQL (and yours truly is the maintainer for the underlying Debian package).
We maintain those as binaries for a reason: so that you don't kill yourself trying to figure out to do it by hand.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With