3

I have recently made the move from Windows to Ubuntu (actually for the 2nd time, but I think this time it is for real!), and I have managed to install R and RStudio.

When, in RStudio, I run the line

install.packages("devtools")

I get a whole bunch of errors, including

ERROR: dependencies ‘httr’, ‘git2r’ are not available for package ‘devtools’
* removing ‘/home/travis/R/x86_64-pc-linux-gnu-library/3.4/devtools’

When I install packages in Windows as above, it always installs all dependencies at the same time.

How do I fix this and what is going on here?

Zanna
  • 72,312

2 Answers2

2

I found the answer. Apparently I need to run

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

In general, the SystemRequirements field of an R package's DESCRIPTION file will tell you what additonal dependencies you will need to install.

In the case of devtools, you should have seen some errors when installing some of its depnedencies (e.g. curl). Taking a look at curl, it tells us it needs libcurl:

SystemRequirements: libcurl: libcurl-devel (rpm) or libcurl4-openssl-dev (deb).

and tells us which deb package to install to get it.

amc
  • 7,292