Problems installing the devtools package

后端 未结 15 1928
耶瑟儿~
耶瑟儿~ 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

    If you are using Ubuntu/Linux:

    sudo apt-get install libcurl4-openssl-dev libssl-dev
    
    0 讨论(0)
  • 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")
    
    0 讨论(0)
  • 2020-11-29 15:51

    CentOS 7: I had the libcurl and gnutls development packages installed already, but still got the "cannot load git2r.so" error when installing devtools in R. I had to "reinstall" them for it to work:

    sudo yum reinstall gnutls-devel.x86_64
    
    0 讨论(0)
  • 2020-11-29 15:52

    I hit this issue with Ubuntu 18.04 and none of the previous answers solved it. Eventually I succeeded by installing devtools with the package manager itself:

    sudo apt install r-cran-devtools

    0 讨论(0)
  • 2020-11-29 15:54

    In case if you are using CentOS:

    Try:

    sudo yum -y install libcurl libcurl-devel
    
    0 讨论(0)
  • 2020-11-29 15:56

    Nowadays (ubuntu 14.04) I need both:

     $ sudo apt-get -y install libcurl4-gnutls-dev
     $ sudo apt-get -y install libssl-dev
    
    0 讨论(0)
提交回复
热议问题