Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help w/ RMySQL
07-28-2011, 01:06 AM
Post: #1
Help w/ RMySQL
Hi,

I can't get RMySQL to work! I've worked through the book up until Chapter 4.3.2, but I can't figure out how to get RMySQL to work.

I have Windows 7 and current Perl, R, MySQL programs installed. Don't think I am getting the Rtools to install correctly???

Here is the error message:
ERROR: configuration failed for package 'RMySQL'
* removing 'C:/Program Files/R/R-2.13.1/library/RMySQL'

The downloaded packages are in
‘C:\Users\Sea Bass\AppData\Local\Temp\RtmpPB2RCc\downloaded_packages’
Warning messages:
1: running command 'C:/PROGRA~1/R/R-213~1.1/bin/x64/R CMD INSTALL -l "C:/Program Files/R/R-2.13.1/library" C:\Users\SEABAS~1\AppData\Local\Temp\RtmpPB2RCc/downloaded_packages/RMySQL_0.8-0.tar.gz' had status 1
2: In install.packages("RMySQL", type = "source") :
installation of package 'RMySQL' had non-zero exit status

Can anyone help me please? I am a total newbie, this book is my first crack at programming...
Find all posts by this user
Quote this message in a reply
07-29-2011, 03:50 PM
Post: #2
RE: Help w/ RMySQL
It seems the more recent version of RMySQL won't install properly under Windows without a little extra work. Try this solution (adapted from http://www.stat.berkeley.edu/users/spect...ows.html):

Download http://www.stat.berkeley.edu/classes/s133/libmySQL.dll to your computer, and navigate to the installation directory for the RMySQL package. In your case it looks like it's c:\Program Files\R\R-2.13.1\library\RMySQL.

In this folder, create a new folder named "bin" (without the quotes), and move the libmySQL.dll file to this new folder. Then, use the following R commands to load the package:

> Sys.setenv(MYSQL_HOME='c:/Program Files/R/R-2.13.1/library/RMySQL')
> library(RMySQL)

Exclamation Please let me know if this works for you, then I can add it to the errata page.
Find all posts by this user
Quote this message in a reply
09-16-2011, 03:32 AM
Post: #3
RE: Help w/ RMySQL
I am getting the same error message.
After following your suggestions, I am getting this error message.
> Sys.setenv(MYSQL_HOME='c:/Program Files/R/R-2.12.2/library/RMySQL')
> library(RMySQL)
Error in library(RMySQL) : 'RMySQL' is not a valid installed package

I am using R2.12.2.
Find all posts by this user
Quote this message in a reply
11-07-2011, 10:49 PM
Post: #4
RE: Help w/ RMySQL
(09-16-2011 03:32 AM)lexgobleu Wrote:  I am getting the same error message.
After following your suggestions, I am getting this error message.
> Sys.setenv(MYSQL_HOME='c:/Program Files/R/R-2.12.2/library/RMySQL')
> library(RMySQL)
Error in library(RMySQL) : 'RMySQL' is not a valid installed package

I am using R2.12.2.

Sorry not to reply to this before - somehow I didn't get notification of this post. Have you solved the problem yet? If not, can you let me know what OS you're using so we can try to replicate the problem?
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)