I am trying to install devtools in R (R version=3.5.3, OS= Ubuntu 18.04.2 LTS) by using following commands,
install.packages("devtools")
install.packages("devtools")
devtools::install_github("r-lib/devtools")
Its getting downloaded but shows error like this,
ERROR: dependencies ‘httr’, ‘usethis’ are not available for package ‘devtools’
* removing ‘/home/ga/R/x86_64-pc-linux-gnu-library/3.5/devtools’
Warning in install.packages :
installation of package ‘devtools’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpP6MtMf/downloaded_packages’
when I try to call the package as follows,
library(devtools)
Error in library(devtools) : there is no package called ‘devtools’
Therefore, please help me to fix this issue.
Maybe try first successfully installing:
httr
andusethis
?Dear zx8754, When I try to install httr, I am getting error as follows,
Now, maybe try first successfully installing:
curl
andopenssl
? Error is saying, it can't install packageX because it needs packageY and packageZ to be installed first.Try installing using
install.packages("devtools", dependencies=TRUE)
.Dear arup, I tried your command as well and got same error
Not sure why it is not able to get "httr" and "usethis " from CRAN mirror. Can you try with the ETHZ CRAN mirror
install.packages('devtools',dependencies=TRUE, repos='https://stat.ethz.ch/CRAN/')
?Dear arup, Thank you for your help. But still it is showing the same error.
Can you share
sessionInfo()
. Have you tried unloading all the packages/starting a fresh session?The fresh session info as follows,
loaded via a namespace (and not attached): [1] BiocManager_1.30.4 compiler_3.5.3 tools_3.5.3 yaml_2.2.0
Is there a particular reason why you need the github version of devtools, rather than the cran version?
There is no particular reason to install github version of devtools. However, I am getting error, when I tried with cran version as well.
Found a way : apt install libgit2-dev install.packages("gert") then "usethis" then "devtools"