andrewzm / STRbook

Supplementary package for "Spatio-Temporal Statistics with R" by C.K. Wikle, A. Zammit-Mangion, and N. Cressie
75 stars 48 forks source link

Error: Failed to install 'unknown package' from GitHub: #4

Closed Nitheshnirmal closed 3 years ago

Nitheshnirmal commented 3 years ago

Hi, I tried installing the STRbook but the following error repeats. Can you please help me with this error?

Thanks in advance

Nitheshnirmal

devtools::install_github("andrewzm/STRbook")

Downloading GitHub repo andrewzm/STRbook@HEAD andrewzm-STRbook-347d7e0/data/IDE_Sim2_results.rda: truncated gzip input tar.exe: Error exit delayed from previous errors. Error: Failed to install 'unknown package' from GitHub: Does not appear to be an R package (no DESCRIPTION) In addition: Warning messages: 1: In utils::untar(tarfile, ...) : ‘tar.exe -xf "C:\Users\Nivi\AppData\Local\Temp\RtmpgTKue0\file3b9ca2e18d7.tar.gz" -C "C:/Users/Nivi/AppData/Local/Temp/RtmpgTKue0/remotes3b9cce259c3"’ returned error code 1 2: In system(cmd, intern = TRUE) : running command 'tar.exe -tf "C:\Users\Nivi\AppData\Local\Temp\RtmpgTKue0\file3b9ca2e18d7.tar.gz"' had status 1

villegar commented 3 years ago

Can you try to install the latest version of Rtools (https://cran.r-project.org/bin/windows/Rtools/)? It seems to be some issue when uncompressing the installation files from GitHub. I was able to install the package on macOS without any issues.

Nitheshnirmal commented 3 years ago

Thanks villegar for the advice.

I have already installed Rtools40 (latest version) but this was the case. I'm using windows and R version 4.0.2 and Rstudio latest version.

villegar commented 3 years ago

I see, could you try installing the package with remotes:

remotes::install_github("andrewzm/STRbook")
Nitheshnirmal commented 3 years ago

Thanks villegar. I did install remotes and run the code but again the same error repeats.

remotes::install_github("andrewzm/STRbook") Downloading GitHub repo andrewzm/STRbook@HEAD andrewzm-STRbook-347d7e0/data/IDE_Radar_results2.rda: truncated gzip input tar.exe: Error exit delayed from previous errors. Error: Failed to install 'unknown package' from GitHub: Does not appear to be an R package (no DESCRIPTION) In addition: Warning messages: 1: In utils::untar(tarfile, ...) : ‘tar.exe -xf "C:\Users\Nivi\AppData\Local\Temp\Rtmpc1X99k\file5844523a2bb6.tar.gz" -C "C:/Users/Nivi/AppData/Local/Temp/Rtmpc1X99k/remotes584451df24e8"’ returned error code 1 2: In system(cmd, intern = TRUE) : running command 'tar.exe -tf "C:\Users\Nivi\AppData\Local\Temp\Rtmpc1X99k\file5844523a2bb6.tar.gz"' had status 1

Nitheshnirmal commented 3 years ago

There is no problem in installing other github_packages. But the error repeats on installing STRBook.

villegar commented 3 years ago

🤔 next thing we could try is this (https://stackoverflow.com/posts/30989367/revisions):

  1. Download the repo as a ZIP file: https://github.com/andrewzm/STRbook/archive/master.zip
  2. Unzip the file and build the code:
    setwd("C:/Users/Desktop/")
    unzip("master.zip")
    file.rename("master", "STRbook")
    shell("R CMD build STRbook")
  3. Install from the built TAR file:
    install.packages(list.files(pattern="STRbook*.tar.gz"), repos = NULL)
andrewzm commented 3 years ago

Thanks Roberto for helping out.

Nitheshnirmal, I have just re-installed and I don't have that issue either. Did Roberto's last suggestion work? What version of R are you using?

On Wed, Nov 4, 2020 at 10:43 AM Roberto Villegas-Diaz < notifications@github.com> wrote:

🤔 next thing we could try is this ( https://stackoverflow.com/posts/30989367/revisions):

  1. Download the repo as a ZIP file: https://github.com/andrewzm/STRbook/archive/master.zip
  2. Unzip the file and build the code:

setwd("C:/Users/Desktop/")

unzip("master.zip")

file.rename("master", "STRbook")

shell("R CMD build STRbook")

  1. Install from the built TAR file:

install.packages(list.files(pattern="STRbook*.tar.gz"), repos = NULL)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/andrewzm/STRbook/issues/4#issuecomment-721432583, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABEU3NW5LSLXNNB7OFREZLSOCISBANCNFSM4TJI2R2A .

Michaelyc commented 3 years ago

Hi,

I have R-4.0.2, here is my sessionInfo:

sessionInfo()

R version 4.0.2 (2020-06-22)

Platform: x86_64-w64-mingw32/x64 (64-bit)

Running under: Windows 10 x64 (build 19041)

Matrix products: default

locale:

[1] LC_COLLATE=English_United States.1252

[2] LC_CTYPE=English_United States.1252

[3] LC_MONETARY=English_United States.1252

[4] LC_NUMERIC=C

[5] LC_TIME=English_United States.1252

attached base packages:

[1] stats graphics grDevices utils datasets methods base

other attached packages:

[1] devtools_2.3.2 usethis_1.6.3

loaded via a namespace (and not attached):

[1] rstudioapi_0.11 magrittr_1.5 pkgload_1.1.0 lattice_0.20-41

[5] R6_2.4.1 rlang_0.4.7 fansi_0.4.1 tools_4.0.2

[9] pkgbuild_1.1.0 grid_4.0.2 sessioninfo_1.1.1 cli_2.0.2

[13] withr_2.2.0 remotes_2.2.0 ellipsis_0.3.1 assertthat_0.2.1

[17] digest_0.6.27 rprojroot_1.3-2 crayon_1.3.4 processx_3.4.4

[21] Matrix_1.2-18 callr_3.5.1 fs_1.4.2 ps_1.3.3

[25] curl_4.3 testthat_2.3.2 memoise_1.1.0 glue_1.4.1

[29] compiler_4.0.2 desc_1.2.0 backports_1.1.8 prettyunits_1.1.1

I got an error when installing the STRbook:

Error: Failed to install 'STRbook' from GitHub:

(converted from warning) cannot remove prior installation of package ‘digest’ This error was easily fixed by installing the “digest”. Then it was smooth to finish the installation of “STRbook”.

One suggestion is to check the “PATH” variable to see if the correct rtool is loaded.

Hope this info is helpful.

Regards

Yi

From: Andrew Zammit Mangion notifications@github.com Sent: Wednesday, November 4, 2020 12:01 PM To: andrewzm/STRbook STRbook@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [andrewzm/STRbook] Error: Failed to install 'unknown package' from GitHub: (#4)

Thanks Roberto for helping out.

Nitheshnirmal, I have just re-installed and I don't have that issue either. Did Roberto's last suggestion work? What version of R are you using?

On Wed, Nov 4, 2020 at 10:43 AM Roberto Villegas-Diaz < notifications@github.com> wrote:

🤔 next thing we could try is this ( https://stackoverflow.com/posts/30989367/revisions):

  1. Download the repo as a ZIP file: https://github.com/andrewzm/STRbook/archive/master.zip
  2. Unzip the file and build the code:

setwd("C:/Users/Desktop/")

unzip("master.zip")

file.rename("master", "STRbook")

shell("R CMD build STRbook")

  1. Install from the built TAR file:

install.packages(list.files(pattern="STRbook*.tar.gz"), repos = NULL)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/andrewzm/STRbook/issues/4#issuecomment-721432583, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABEU3NW5LSLXNNB7OFREZLSOCISBANCNFSM4TJI2R2A .

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/andrewzm/STRbook/issues/4#issuecomment-721454030, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEVVZGTCA52ABPGOR5A5DNTSOCRT7ANCNFSM4TJI2R2A.

Nitheshnirmal commented 3 years ago

Thank you very much villegar, Andrew, and Yi.

It worked. I followed the steps given by villegar.

Thank you very much for the help.