Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

devtools installation fails #21

Closed
Jason-Conner-NOAA opened this issue Oct 1, 2019 · 5 comments
Closed

devtools installation fails #21

Jason-Conner-NOAA opened this issue Oct 1, 2019 · 5 comments

Comments

@Jason-Conner-NOAA
Copy link

Trying to install FishStatsUtils to overwrite version 2.2.0:
devtools::install_github("james-thorson/FishStatsUtils", force=T)

Fails with this error (similar error with Namespace happens when attempting to compile from source):
Downloading GitHub repo james-thorson/FishStatsUtils@master
√ checking for file 'C:\Users\Jason.Conner\AppData\Local\Temp\Rtmp4GpjTb\remotesca1c50201014\James-Thorson-NOAA-FishStatsUtils-2154071/DESCRIPTION' (362ms)

  • preparing 'FishStatsUtils': (1.1s)
    √ checking DESCRIPTION meta-information ...
  • checking for LF line-endings in source and make files and shell scripts (600ms)
  • checking for empty or unneeded directories
  • looking to see if a 'data/datalist' file should be added
  • building 'FishStatsUtils_2.3.0.tar.gz' (3.4s)

Installing package into ‘C:/Users/Jason.Conner/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)

  • installing source package 'FishStatsUtils' ...
    ** R
    ** data
    *** moving datasets to lazyload DB
    ** byte-compile and prepare package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** testing if installed package can be loaded
    Downloading GitHub repo kaskr/TMB_contrib_R@master
    Error: package or namespace load failed for 'FishStatsUtils':
    .onAttach failed in attachNamespace() for 'FishStatsUtils', details:
    call: utils::download.file(url, path, method = download_method(), quiet = quiet,
    error: cannot open URL 'https://api.github.com/repos/kaskr/TMB_contrib_R/tarball/master'
    Error: loading failed
    Execution halted
    ERROR: loading failed
  • removing 'C:/Users/Jason.Conner/Documents/R/win-library/3.5/FishStatsUtils'
  • restoring previous 'C:/Users/Jason.Conner/Documents/R/win-library/3.5/FishStatsUtils'
    In R CMD INSTALL
    Error in i.p(...) :
    (converted from warning) installation of package ‘C:/Users/JASON~1.CON/AppData/Local/Temp/Rtmp4GpjTb/fileca1c52ad4feb/FishStatsUtils_2.3.0.tar.gz’ had non-zero exit status
@Jason-Conner-NOAA
Copy link
Author

R version MRAN 3.5.3, VAST version 3.1.0

@James-Thorson-NOAA
Copy link
Owner

Some versions of R on our gov machines are having a problem with installing stuff using devtools, and the symptom is an error about utils::download.file which occurs when installing anything from GitHub (e.g., TMB_contrib_R\TMBhelper in your case). I don't know if its a problem with our IT privileges or devtools, and really someone (not me) should look into it generically for AFSC users.

The solution for now is to bypass utils::download.file by either:

  1. Downloading each github package individually as a ZIP, e.g., by going to https://github.com/kaskr/TMB_contrib_R and clicking "Clone or download" and then using devtools::install_local(.) to install that ZIP
  2. Doing the same thing, but cloning locally using a git client, and then using devtools::install_local(.) on that directory.

Could you update to confirm whether this works or not?

@Jason-Conner-NOAA
Copy link
Author

Thanks Jim, that worked. For the record, I am running this on a clean install of Win 10, without any AFSC configuration. I think this actually may be a permissions issue for the repo on kaskr, perhaps a download limit?

@James-Thorson-NOAA
Copy link
Owner

James-Thorson-NOAA commented Oct 1, 2019 via email

@James-Thorson
Copy link
Collaborator

James-Thorson commented Sep 22, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants