Home > Back-end >  Error 404 installing R package from public github repro
Error 404 installing R package from public github repro

Time:11-01

I am trying to install the gaRdenbox package from github (https://github.com/KTMD-plant/gaRdenbox)

But when I run

install_github("KTMD-plant/gaRdenbox")

it returns

Error: Failed to install 'unknown package' from GitHub: HTTP error 404. Not Found Did you spell the repo owner (KTMD-plant) and repo name (gaRdenbox) correctly? -If spelling is correct, check that you have the required permissions to access the repo.

As far as I can see the repro is public. Do you have any idea what is the issue here?

CodePudding user response:

This is a bug in package gaRdenbox as the file DESCRIPTION is 'missing' given that there is only a file Description.

You can test that by forking the package and altering the file by renaming it -- which I did in this fork in my repo. Now we can install as expected:

edd@rob:/tmp$ installGithub.r eddelbuettel/gaRdenbox
Using github PAT from envvar GITHUB_PAT
Downloading GitHub repo eddelbuettel/gaRdenbox@HEAD

✔  checking for file ‘/tmp/remotes12841a2d0cc36c/eddelbuettel-gaRdenbox-fd41a57/DESCRIPTION’ ...
─  preparing ‘gaRdenbox’:
✔  checking DESCRIPTION meta-information
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building ‘gaRdenbox_0.0.1.0.tar.gz’
   
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
* installing *source* package ‘gaRdenbox’ ...
** using staged installation
** R
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (gaRdenbox)
edd@rob:/tmp$ 

(where installGitHub.r is a simple wrapper for the command-line from my littler package). You can ignore the PAT message; I have one in my environment for other reasons.

I have filed a PR at the upstream repo.

  • Related