Problems installing the devtools package

后端 未结 15 2136
耶瑟儿~
耶瑟儿~ 2020-11-29 15:32

I wish to use the devtools package. I\'ve run the following commands:

> install.packages(\"devtools\", dependencies = TRUE)
....
> library         


        
15条回答
  •  清歌不尽
    2020-11-29 15:49

    Best solution to solve this. I was searching the same problem. I spent 1 day and then I got solution. Now, It is well.

    Check your R version in bash terminal if you are on Ubuntu or Linux.

    R --version
    

    then use these commands

    sudo apt-get update 
    sudo apt-get upgrade              
    

    Now check the new version of R. Use this command

    sudo apt-cache showpkg r-base
    

    Now update the R only.

    sudo apt-get install r-base
    

    Now R will be updated and the error will be removed. Make sure to cd the library path where you want to install the new package. This way in bash terminal. Try to create the R directory at home folder or it will be at the default. Locate this location for package ~/R/lib/ .

    R
    .libPaths("~/R/lib")
    install.packages("devtools")
    

    OR

    install.packages("devtools", lib="~/R/lib")
    

提交回复
热议问题