Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing devtools fails because of dependency, but dependency is not available for the R version I have

Tags:

linux

r

configure: error: 
---------------------------------------------
  OpenSSL library required

  Please install:
  libssl-dev (deb) or openssl-devel (rpm)
---------------------------------------------
See `config.log' for more details
ERROR: configuration failed for package ‘git2r’
 * removing ‘/home/udi/R/x86_64-pc-linux-gnu-library/3.2/git2r’
ERROR: dependency ‘openssl’ is not available for package ‘httr’
 * removing ‘/home/udi/R/x86_64-pc-linux-gnu-library/3.2/httr’
ERROR: dependencies ‘httr’, ‘git2r’ are not available for package ‘devtools’
 * removing ‘/home/udi/R/x86_64-pc-linux-gnu-library/3.2/devtools’

However, when I try to install libssl-dev (I have Ubuntu 14.04.3) then I got the message "‘libssl-dev’ is not available (for R version 3.2.2)".

Any idea what to do? Download a new R version or is there any other solution?

like image 977
Udi Avatar asked Jan 28 '16 14:01

Udi


People also ask

Why can't I install DevTools in R?

You have a lot of outdated packages that are causing installation issues and you are using a quite old R version, I recommend you to update R to the latest version (3.6.2) and update your packages with. Then you can try to install devtools again

Is it possible to import remotes from R session to DevTools?

Recent versions of devtools already import remotes under the hood because that functionality is no longer implemented on devtools itself so a separate installation of remotes shouldn't make any difference. It is likely that your problem has been solved just by restarting your R session since there are not any issues in your installation logs.

Is rtools an R package?

Rtools is not an R package is a separate software that you have to download and install Thanks, @andresrcs! I've installed Rtools, and changed my default library which should now be the first on the following list, I believe: > .libPaths () [1] "C:/Program Files/R/R-3.6.3/library" "\\fs01/users/asafsa/R/win-library/3.6" [3] "C:/R_custom_library"

How to fix “r is not updating” error in Linux?

Check your R version in bash terminal if you are on Ubuntu or Linux. Now update the R only. 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.


2 Answers

That is a system package - not a R package. From the command line you can run

sudo apt-get install libssl-dev
like image 113
Dason Avatar answered Sep 28 '22 11:09

Dason


What fixes the problem in my Ubuntu is installing this:

sudo apt-get install zlib1g-dev

It is not immediately apparent unless you do:

install.packages("git2r")

it will throw this error:

The zlib library that is required to build
   git2r was not found.

   Please install:
     zlib1g-dev (package on e.g. Debian and Ubuntu)
     zlib-devel (package on e.g. Fedora, CentOS and RHEL)
   and try again.
like image 29
f0nzie Avatar answered Sep 28 '22 09:09

f0nzie