How to install devtools on Ubuntu

  • Posted on October 29, 2019
  • R
  • janpislAsked by janpisl

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 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!


Submit an answer

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

This comment has been deleted


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