Swirl: Cannot install on Ubuntu 16.04 R3.3.1

Created on 21 Jul 2016  Â·  6Comments  Â·  Source: swirldev/swirl

Please help if you are able.
I have searched online and re-installed R several times to no avail
I get the following:

install.packages("swirl")
Installing package into ‘/home/ds/R/x86_64-pc-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
also installing the dependencies ‘openssl’, ‘httr’

trying URL 'https://cran.rstudio.com/src/contrib/openssl_0.9.4.tar.gz'
Content type 'application/x-gzip' length 1165388 bytes (1.1 MB)

downloaded 1.1 MB

trying URL 'https://cran.rstudio.com/src/contrib/httr_1.2.1.tar.gz'
Content type 'application/x-gzip' length 133398 bytes (130 KB)

downloaded 130 KB

trying URL 'https://cran.rstudio.com/src/contrib/swirl_2.4.2.tar.gz'
Content type 'application/x-gzip' length 98565 bytes (96 KB)

downloaded 96 KB

  • installing _source_ package ‘openssl’ ...
    ** package ‘openssl’ successfully unpacked and MD5 sums checked
    Using PKG_CFLAGS=
    Using PKG_LIBS=-lssl -lcrypto

------------------------- 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 (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=...'


ERROR: configu

ERROR: configuration failed for package ‘openssl’

  • removing ‘/home/ds/R/x86_64-pc-linux-gnu-library/3.3/openssl’
    Warning in install.packages :
    installation of package ‘openssl’ had non-zero exit status
    ERROR: dependency ‘openssl’ is not available for package ‘httr’
  • removing ‘/home/ds/R/x86_64-pc-linux-gnu-library/3.3/httr’
    Warning in install.packages :
    installation of package ‘httr’ had non-zero exit status
    ERROR: dependency ‘httr’ is not available for package ‘swirl’
  • removing ‘/home/ds/R/x86_64-pc-linux-gnu-library/3.3/swirl’
    Warning in install.packages :
    installation of package ‘swirl’ had non-zero exit status

Most helpful comment

Got it thanks!!!
I had been back and forth so many times and gotten the following ANTICONF ERROR, but thought that openssl was already installed via

4 on https://github.com/swirldev/swirl/wiki/Installing-swirl-on-Linux:

"Install libcurl.
This is required for the RCurl package, which swirl uses to download courses from the internet.
$ sudo apt-get install libcurl4-openssl-dev "
which led me to believe it had something to do with PATH

But your advice paid off. Thank you!

install.packages("openssl") led to 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 (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 then to linux prompt:
$ sudo apt-get install libssl-dev

and then back to R
install.packages("openssl")
which was successful
then
install.packages("swirl")

  • DONE (swirl)
    and finally:

library(swirl)

| Hi! Type swirl() when you are ready to begin.

:)

All 6 comments

Thanks. Yes, I did when initially installing. I made sure to get the most recent version of R available (3.3.1), installed RStudio, and installed libcurl.
It was only when I tried to install swirl that I ran into problems.
It seems that R does not recognize that openssl is installed.

I had just done a clean install of Ubuntu, so R was being installed for the first time.

What happens if you try install.packages("openssl")?

Got it thanks!!!
I had been back and forth so many times and gotten the following ANTICONF ERROR, but thought that openssl was already installed via

4 on https://github.com/swirldev/swirl/wiki/Installing-swirl-on-Linux:

"Install libcurl.
This is required for the RCurl package, which swirl uses to download courses from the internet.
$ sudo apt-get install libcurl4-openssl-dev "
which led me to believe it had something to do with PATH

But your advice paid off. Thank you!

install.packages("openssl") led to 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 (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 then to linux prompt:
$ sudo apt-get install libssl-dev

and then back to R
install.packages("openssl")
which was successful
then
install.packages("swirl")

  • DONE (swirl)
    and finally:

library(swirl)

| Hi! Type swirl() when you are ready to begin.

:)

Yay awesome! Let me know if you run into any other issues.

thanks very much, I'll just comment this so maybe the search improves
worked great on linux mint sylvia

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nmcgarry picture nmcgarry  Â·  4Comments

tgsutterby picture tgsutterby  Â·  12Comments

sugarcane29 picture sugarcane29  Â·  14Comments

HengshuoLiu picture HengshuoLiu  Â·  12Comments

bwkeim picture bwkeim  Â·  46Comments