Winnie09 / Lamian

39 stars 9 forks source link

remotes::install_github fails #24

Closed yesitsjess closed 4 months ago

yesitsjess commented 5 months ago

> remotes::install_github("Winnie09/Lamian")

Downloading GitHub repo Winnie09/Lamian@HEAD
Error in utils::download.file(url, path, method = method, quiet = quiet,  : 
  download from 'https://api.github.com/repos/Winnie09/Lamian/tarball/HEAD' failed
Winnie09 commented 4 months ago

Hi,

Can you try "devtools" instead of "remotes"?

In addition, you can directly download the package from the GitHub repository as a ZIP file, unzip it, and install it from the local directory using install.packages(path_to_unzipped_folder, repos = NULL, type = "source"), replacing path_to_unzipped_folder with the actual path to the unzipped package directory.

Please let me know if this works.

yesitsjess commented 4 months ago

Hi - thank you for your help, I can't install devtools unfortunately. I tried remotes::install_local(paste0(.libPaths(), "/", grep("zip", dir(.libPaths()), value=T))) which failed with ERROR: dependency ‘gert’ is not available for package ‘usethis’.

I tried installing 'gert' separately but I get an error similar to other users so I'll also try to figure that out and close the issue if I succeed.

I also tried your suggestion but unfortunately I also get an error:

> install.packages(paste0(.libPaths(), "/", grep("zip", dir(.libPaths()), value=T)), repos = NULL, type = "source")

Error in rawToChar(block[seq_len(ns)]) : 
  embedded nul in string: 'PK\003\004\n\0\0\0\0\0\xe6i\xd1V\0\0\0\0\0\0\0\0\0\0\0\0\016\0\t\0Lamian-master/UT\005\0\001Q\024\x8edPK\003\004\n\0\0\0\b\0\xe6i\xd1Vxd\xe1\x97s\001\0\0\004\030\0\0\027\0\t\0Lamian-master/.DS'
yesitsjess commented 4 months ago

Hi again, I managed to get it installed with remotes::install_local(paste0(.libPaths(), "/", grep("zip", dir(.libPaths()), value=T))) eventually :) I look forward to trying it out on my dataset now!

Just as an FYI, if I run devtools I get:

> devtools::install_github("Winnie09/Lamian")
Downloading GitHub repo Winnie09/Lamian@HEAD
Error in utils::download.file(url, path, method = method, quiet = quiet,  : 
  download from 'https://api.github.com/repos/Winnie09/Lamian/tarball/HEAD' failed