I\'m running Ubuntu 16.04 [now 17.04: see note in bold below] and R 3.4.1. I installed the latter this morning, so I presume it\'s the latest version. I want to install Tidy
I run into the same problem, using elementary loki, based on ubuntu 16.04. Reading the output, I realized there was a very informative error message, that looked like this
------------------------- ANTICONF ERROR ---------------------------
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)
If openssl is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a openssl.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
So I followed each prompt, installing the required deb, which came up to
sudo apt-get install libssl-dev libxml2-dev libcurl4-openssl-dev
and it worked, after I had already tried installing the cran packages listed above, without adding the new repositories.
In some cases I find that I need to install the Ubuntu packages. To install the Tidyverse I added
sudo apt-get install r-cran-curl r-cran-openssl r-cran-xml2
After installing these packages, I could install the Tidyverse.
I believe had a similar problem trying to install the tidyverse package. Being reasonably new to Linux and a complete rookie to R, I followed the Ubuntu installation intructions on the CRAN Project's homepage. When I installed R, I deliberately skipped installation of the r-base-dev package, as it said it was intended for "package maintainers". I didn't really read the latter part or understand the necessity for compiling packages myself.
Anyway, installing r-base-dev
package, and allowed me to install the Tidyverse package without problems. The complete steps to get it to work should be something like below. In terminal do the following steps (Step 1-3 may or may not be necessary, but I've added them just in case):
deb https://<my.favorite.cran.mirror>/bin/linux/ubuntu artful/
in your /etc/apt/sources.list
file, replacing by the actual URL of your favorite CRAN mirror. See https://cran.r-project.org/mirrors.html for the list of CRAN mirrors.Add the repository key to your system:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
An alternate method can be used by retrieving the key with
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
and then feed it to apt-key with
gpg -a --export E084DAB9 | sudo apt-key add -
To install the complete R system, use
sudo apt-get update
sudo apt-get install r-base
Then comes the step I missed, that proved crucial to be able to compile the packages within the Tidyverse package, namely installing the r-base-dev
package:
sudo apt-get install r-base-dev
Then in RStudio execute the package installation command:
install.packages(tidyverse)
Hopefully this will work for you as well. Read the installation guide on the CRAN Projects homepages for further about the installation procedure.