Question

How to install devtools on Ubuntu

  • Posted October 29, 2019
  • R

I was following your tutorial [1] on how to install R devtools on Ubuntu but I am stuck at the first step:

sudo apt install build-essential libcurl4-gnutls-dev libxml2-dev libssl-dev

I get an error that some of the packages could not be installed:

The following packages have unmet dependencies:
 libssl-dev : Depends: libssl1.1 (= 1.1.0g-2ubuntu4) but 1.1.1-1ubuntu2.1~18.04.4 is to be installed
              Recommends: libssl-doc but it is not going to be installed
 libxml2-dev : Depends: libicu-dev but it is not going to be installed
               Depends: libxml2 (= 2.9.4+dfsg1-6.1ubuntu1) but 2.9.4+dfsg1-6.1ubuntu1.2 is to be installed
E: Unable to correct problems, you have held broken packages.

I tried to search askubuntu.com as well as some forums and tried different solutions listed here but nothing helped. I am using Ubuntu 18.04 and it was a fresh installation (it’s a new laptop). Do you have any idea what I can do about it?

Thank you!

[1] https://www.digitalocean.com/community/tutorials/how-to-install-r-packages-using-devtools-on-ubuntu-18-04

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

This comment has been deleted

Hello,

I’ve just tested that on a new Ubuntu 18.04 droplet and it worked out of the box.

What is your exact Ubuntu version that you are using?

I would recommend running the following:

sudo apt update

And then try again with the apt install command.

Regards, Bobby