Error installing RMySQL
Asked Answered
A

5

7

It took a good amount of time to install RMySQL on my Linux machine but I was able to install it after changing environment variables and copy and paste lib.dll file.

However, I'm now trying to install RMySQL on my 64bit window machine, but so far there's no progress yet for two days. It broke down after "running command sh ./configure.win had status 127 error, and I cannot find what this means.

Can anyone shed some lights on this?

install.packages('RMySQL',type='source') 
Installing package into ‘C:/Users/chu/Documents/R/win-library/3.1’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/src/contrib/RMySQL_0.9-3.tar.gz'
Content type 'application/x-gzip' length 165363 bytes (161 Kb)
opened URL
downloaded 161 Kb

* installing *source* package 'RMySQL' ...
** package 'RMySQL' successfully unpacked and MD5 sums checked
Warning: running command 'sh ./configure.win' had status 127
ERROR: configuration failed for package 'RMySQL'
* removing 'C:/Users/chu/Documents/R/win-library/3.1/RMySQL'
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-31~1.0/bin/x64/R" CMD INSTALL -l "C:\Users\chu\Documents\R\win-library\3.1" C:\Users\chu\AppData\Local\Temp\RtmpKA9e7I/downloaded_packages/RMySQL_0.9-3.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘RMySQL’ had non-zero exit status

The downloaded source packages are in
    ‘C:\Users\chu\AppData\Local\Temp\RtmpKA9e7I\downloaded_packages’
Assimilate answered 24/6, 2014 at 6:28 Comment(2)
Did you follow biostat.mc.vanderbilt.edu/wiki/Main/RMySQL?Raynold
An exact duplicate has been posted, but there are no answers either.Haldi
E
6

for linux users.. install- libmysql first

sudo apt-get install libmysql++-dev

then try.

Ellison answered 26/9, 2016 at 13:32 Comment(0)
S
1

I was facing the same error. Given below is the link to a way around that worked for me. http://www.ahschulz.de/2013/07/23/installing-rmysql-under-windows/

In short, the location of library libmysqll.dll required for compilation, had to be changed from lib folder to bin folder of the home directory set for MySQL in environment variables.

Scan answered 14/10, 2014 at 9:57 Comment(2)
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.Thoth
That is why I added those two lines explaining the library location is to be changed...Scan
Y
1

By default, R uses the /tmp directory to install packages. On security conscious machines, the /tmp directory is often marked as “noexec” in the /etc/fstab file. This means that no file under /tmp can ever be executed. Packages that require compilation or that have self-inflating data will fail with the error mentioned.

The solution is to set the TMPDIR environment variable outside R (in your shell), which R will use as the compilation directory. How to do this depends on the shell. bash:

mkdir ~/tmp
export TMPDIR=~/tmp

Then R can compile and install the package.

Yuyuan answered 18/3, 2016 at 12:50 Comment(0)
F
0


I ran into the same problem while updating packages on Windows server for latest version of R.
I solved it by installing from a .zip file vs .tar.gz.

I actually had to go through the process of first downloading the package, and then installing from it (not from mirror) for other reasons.
Here is what it looked like:

pk <- 'caTools'
download.packages(pk, "R-3.2-packages/" ,type = "win.binary")
install.packages(
    dir("R-3.2-packages/",pattern=pk,full.names = TRUE), 
    repos = NULL,
    type = "source")

Hope this helps.

Fadeless answered 28/9, 2015 at 22:27 Comment(0)
H
0

Solution if anyone faced the same problem on windows:

Make sure your MYSQL_HOME environment variable is set correctly and libmysql.dll is copied to bin folder!!!

Run install.packages('RMySQL') then when the "Do you want to install from sources..." window pops up select No.

Then copy the downloaded binary packages location from console.

Go to Packages -> Install, paste the location into Package archive and click Install.

Hundredth answered 30/11, 2022 at 8:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.