R/ RStudio - install devtools fails?

后端 未结 5 1542

I am trying to install devtools in my RStudio. But I get tons of errors:

* installing *source* package ‘curl’ ...
** package ‘curl’ successfully unp         


        
相关标签:
5条回答
  • 2021-02-16 00:34

    Error Message: Package libcurl was not found in the pkg-config search path. Perhaps you should add the directory containing `libcurl.pc'

    Executed this command:

    rpm -qa|grep curl

    Result

    python-pycurl-7.19.0-19.el7.x86_64  
    curl-7.29.0-42.el7_4.1.x86_64  
    libcurl-7.29.0-42.el7_4.1.x86_64  
    -->libcurl-devel-7.29.0-42.el7_4.1.x86_64  <---this entry was missing
    

    Executed this command

    yum install libcurl-devel

    problem solved.

    0 讨论(0)
  • 2021-02-16 00:37

    Your question contains the answer:-

    Configuration failed because openssl was not found. Try installing:
     * deb: libssl-dev (Debian, Ubuntu, etc)
     * rpm: openssl-devel (Fedora, CentOS, RHEL)
     * csw: libssl_dev (Solaris)
     * brew: openssl@1.1 (Mac OSX)
    
    0 讨论(0)
  • 2021-02-16 00:40

    None of the above answers worked for me on Ubuntu 18.04.3 LTS using R version 3.6.1

    My guess is this might have something to do with Anaconda3...

    What worked for me is:

    conda install -c r r-devtools 
    

    Then in R

    install.packages("rlang")
    install.packages("devtools")
    

    I should mention that conda as a package manager for R works great but you should stick to conda as much as you can, i.e. DON'T INSTALL PACKAGES IN R, BUT WITH CONDA (unless there is not a recipe for that package) using either conda-forge, bioconda, and defaults channels (open-source channels); being careful not to mix with proprietary channels (e.g. anaconda, r).

    When you need packages that are not available in the channel set you are using, you must install them by hand into an external location outside of the conda environment. For example, .libPaths() shows I have two libraries:

    • /home/tsundoku/anaconda3/lib/R/library # where anaconda packages are stored
    • /usr/lib/R/library # where I store packages in external location

    For a good read on managing .libPaths() see @MilesMcBain's blog-post here

    0 讨论(0)
  • 2021-02-16 00:51

    The error messages may be a bit confusing, because RStudio is asking you to install libcurl and openssl libraries for your Linux OS; for those you actually need Ubuntu packages instead of R packages.

    Open a command line terminal, and type

    sudo apt-get install libcurl4-openssl-dev libssl-dev 
    

    Once the installation of your Ubuntu packages is completed, try again and you'll be able to install the devtools R package

    0 讨论(0)
  • 2021-02-16 00:58

    We can use

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