I've been attempting to install RMySQL in RStudio for quite some time now. I've installed the DBI dependency and have attempted to install RMySQL with the following error:
Configuration error: could not find the MySQL installation include and/or library directories. Manually specify the location of the MySQL libraries and the header files and re-run R CMD INSTALL.
INSTRUCTIONS:
Define and export the 2 shell variables PKG_CPPFLAGS and PKG_LIBS to include the directory for header files (*.h) and libraries, for example (using Bourne shell syntax):
export PKG_CPPFLAGS="-I" export PKG_LIBS="-L -lmysqlclient"
Re-run the R INSTALL command:
R CMD INSTALL RMySQL_.tar.gz
Alternatively, you may pass the configure arguments --with-mysql-dir= (distribution directory) or --with-mysql-inc= (where MySQL header files reside) --with-mysql-lib= (where MySQL libraries reside) in the call to R INSTALL --configure-args='...'
R CMD INSTALL --configure-args='--with-mysql-dir=DIR' RMySQL_.tar.gz
ERROR: configuration failed for package ‘RMySQL’ * removing ‘/home/zlau/R/i686-pc-linux-gnu-library/2.14/RMySQL’ Warning in install.packages : installation of package ‘/home/zlau/R/i686-pc-linux-gnu-library/2.14/RMySQL_0.9-3.tar.gz’ had non-zero exit status
This is a common error that is said to be resolved by installing the following package from the Ubuntu command line: libmysqlclient-dev (or some version of it). I've attempted several times to install with "sudo apt-get install libmysqlclient-dev" Each time I receive the following error a 404 not found error for the following...
http://archive.ubuntu.com/ubuntu/precise-updates/main libmysqlclient-dev i386 5.5.32-0ubuntu0.12.04.1
If anyone can help, it would be much appreciated. I cannot post images yet.