Can't install RMySQL on R 3.0.2 (ubuntu 14.04)

For me I just needed to get the right package containing these files

sudo apt-get install libmysqlclient-dev

For my ubuntu version 14.04.3 all I needed to do was:

install.packages("RMySQL", dependencies=TRUE)

Had more of a problem on a windows machine a while back but, it turned out it was a compatibility issue with perl so I (1) uninstalled perl, (2) installed RMySQL in a same way then (3) reinstalled perl.

Has worked ever since.


Your inputs are wrong, first of all get rid of the greater than and less than signs. Then for the MySQL include directory run the command:

$ mysql_config --include

SO if it's the same path that you already provided instead of:

export PKG_CPPFLAGS="-I</usr/include/mysql>"

enter:

export PKG_CPPFLAGS="-I/usr/include/mysql"

for library path enter the command:

$ mysql_config --libs

and same with the above enter the path without the signs for me it is like:

export PKG_LIBS="-L/usr/lib/x86_64-linux-gnu -lmysqlclient"

Finally in the last input instead of "version" specify a version number. These steps should fix your problem. For editing and writing in the /etc/ directory you should have the permissions, if you are the administrator you can do that by sudo command. and also the path that you provided is for windows not linux.

Tags:

Mysql

Ubuntu

R