ropensci / rerddap

R client for working with ERDDAP servers
https://docs.ropensci.org/rerddap
Other
40 stars 14 forks source link

install.packages('rerddap') fails on Windows #62

Closed mwengren closed 7 years ago

mwengren commented 7 years ago

I'm an R newbie, but I can't install rerddap on Windows without the following error.

Am I missing a step, or is it not compatible with my environment?

Windows 10 R 3.2.5 (64 bit)

> install.packages("rerddap")

  There is a binary version available but the source version is later:
        binary source needs_compilation
rerddap  0.3.4  0.4.2             FALSE

installing the source package ‘rerddap’

trying URL 'https://cran.rstudio.com/src/contrib/rerddap_0.4.2.tar.gz'
Content type 'application/x-gzip' length 1066645 bytes (1.0 MB)
downloaded 1.0 MB

* installing *source* package 'rerddap' ...
** package 'rerddap' successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  there is no package called 'DBI'
ERROR: lazy loading failed for package 'rerddap'
* removing 'C:/Working/local/r/R-3.2.5/library/rerddap'
Warning in install.packages :
  running command '"C:/Working/local/r/R-32~1.5/bin/x64/R" CMD INSTALL -l "C:\Working\local\r\R-3.2.5\library" C:\Users\MICAH~1.WEN\AppData\Local\Temp\1\RtmpYR0N4s/downloaded_packages/rerddap_0.4.2.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘rerddap’ had non-zero exit status
sckott commented 7 years ago

thanks for the issue @mwengren - on vacation this week, will answer next week

sckott commented 7 years ago

@mwengren The bit to pay attention there is there is no package called 'DBI'

try install.packages("DBI"), then try installing rerddap again

mwengren commented 7 years ago

Thanks, that did the trick. Not knowing much about R, I assumed it would do some dependency management to install dependent packages. Recommend adding the dependencies directly to your readme.md

install.packages("DBI")
install.packages("rerddap")

so users who expect to follow those and have it work won't be stumped.

sckott commented 7 years ago

@mwengren glad it worked. that's a bit odd you had that problem since I think DBI is needed via dplyr, but dplyr has DBI in Suggests, so i don't think DBI is needed when installing this pkg.

I'm on R v.3.4.1

I thought I might be able to replicate your problem on my Mac with R 3.2.5 but i couldn't replicate the problem, installation went fine.

I can certainly add a note to the readme in case users see the same problem