Error: Failed to install 'unknown package' from GitHub
I got the follow error with R3.6.0 and R4.0.2, how to solve it?
devtools::install_github("davidaknowles/leafcutter/leafcutter") Error: Failed to install 'unknown package' from GitHub: An unknown option was passed in to libcurl
remotes::install_git("https://github.com/davidaknowles/leafcutter.git") Downloading git repo https://github.com/davidaknowles/leafcutter.git '/usr/bin/git' clone --depth 1 --no-hardlinks https://github.com/davidaknowles/leafcutter.git /tmp/RtmpdzfYwp/file299733ab1fb99 remote: Enumerating objects: 164, done. remote: Counting objects: 100% (164/164), done. remote: Compressing objects: 100% (148/148), done. remote: Total 164 (delta 43), reused 57 (delta 10), pack-reused 0 Receiving objects: 100% (164/164), 4.49 MiB | 1.27 MiB/s, done. Resolving deltas: 100% (43/43), done. Error: Failed to install 'unknown package' from Git: Does not appear to be an R package (no DESCRIPTION)
I was having the same issue with R3.6.0 (after a number of difficulties installing devtools itself).
I found quite a bit of information in this post about how to fix this same issue for curl (totally independent of R) but it seemed my curl was working fine on the command line and I was only having the issue with devtools.
Ultimately, for me, the solution was super simple. I just loaded devtools as a library first instead of using the "pkg::command" syntax
library(devtools)
install_github("some_repo/some_pkg")
I don't know enough to understand why this works but my (totally uninformed) guess is that when I load devtools first it changes where/how the curl and curllibs are pointed to.
@davidaknowles we should really replace this example with remotes instead of devtools, much quicker installation.