Swirl: Trouble installing swirl on ubuntu 16.04, R 3.2.3 (appears to be the latest version)

Created on 24 Jun 2016  Â·  20Comments  Â·  Source: swirldev/swirl

I have already tried the steps at [https://github.com/swirldev/swirl/wiki/Installing-swirl-on-Linux], including step 4 (libcurl4-openssl-dev is already the newest version (7.47.0-1ubuntu2).)

I get the following message when trying to install swirl:

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

--2016-06-24 02:05:20-- https://cran.rstudio.com/src/contrib/openssl_0.9.4.tar.gz
Resolving cran.rstudio.com (cran.rstudio.com)... 54.192.45.189
Connecting to cran.rstudio.com (cran.rstudio.com)|54.192.45.189|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1165388 (1,1M) [application/x-gzip]
Saving to: ‘/tmp/RtmpNmFBIZ/downloaded_packages/openssl_0.9.4.tar.gz’

 0K .......... .......... .......... .......... ..........  4%  661K 2s
50K .......... .......... .......... .......... ..........  8% 1,31M 1s

100K .......... .......... .......... .......... .......... 13% 1,33M 1s
150K .......... .......... .......... .......... .......... 17% 12,7M 1s
200K .......... .......... .......... .......... .......... 21% 1,95M 1s
250K .......... .......... .......... .......... .......... 26% 4,09M 1s
300K .......... .......... .......... .......... .......... 30% 4,84M 0s
350K .......... .......... .......... .......... .......... 35% 4,56M 0s
400K .......... .......... .......... .......... .......... 39% 6,02M 0s
450K .......... .......... .......... .......... .......... 43% 5,29M 0s
500K .......... .......... .......... .......... .......... 48% 6,67M 0s
550K .......... .......... .......... .......... .......... 52% 5,32M 0s
600K .......... .......... .......... .......... .......... 57% 6,45M 0s
650K .......... .......... .......... .......... .......... 61% 4,74M 0s
700K .......... .......... .......... .......... .......... 65% 6,10M 0s
750K .......... .......... .......... .......... .......... 70% 7,06M 0s
800K .......... .......... .......... .......... .......... 74% 4,50M 0s
850K .......... .......... .......... .......... .......... 79% 1,05M 0s
900K .......... .......... .......... .......... .......... 83% 5,80M 0s
950K .......... .......... .......... .......... .......... 87% 12,6M 0s
1000K .......... .......... .......... .......... .......... 92% 20,1M 0s
1050K .......... .......... .......... .......... .......... 96% 10,1M 0s
1100K .......... .......... .......... ........ 100% 43,9M=0,4s

2016-06-24 02:05:21 (3,13 MB/s) - ‘/tmp/RtmpNmFBIZ/downloaded_packages/openssl_0.9.4.tar.gz’ saved [1165388/1165388]

--2016-06-24 02:05:21-- https://cran.rstudio.com/src/contrib/httr_1.2.0.tar.gz
Resolving cran.rstudio.com (cran.rstudio.com)... 54.192.45.189
Connecting to cran.rstudio.com (cran.rstudio.com)|54.192.45.189|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 133324 (130K) [application/x-gzip]
Saving to: ‘/tmp/RtmpNmFBIZ/downloaded_packages/httr_1.2.0.tar.gz’

 0K .......... .......... .......... .......... .......... 38%  468K 0s
50K .......... .......... .......... .......... .......... 76% 1,34M 0s

100K .......... .......... .......... 100% 7,53M=0,1s

2016-06-24 02:05:21 (884 KB/s) - ‘/tmp/RtmpNmFBIZ/downloaded_packages/httr_1.2.0.tar.gz’ saved [133324/133324]

--2016-06-24 02:05:21-- https://cran.rstudio.com/src/contrib/swirl_2.4.2.tar.gz
Resolving cran.rstudio.com (cran.rstudio.com)... 54.192.45.189
Connecting to cran.rstudio.com (cran.rstudio.com)|54.192.45.189|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 98565 (96K) [application/x-gzip]
Saving to: ‘/tmp/RtmpNmFBIZ/downloaded_packages/swirl_2.4.2.tar.gz’

 0K .......... .......... .......... .......... .......... 51%  657K 0s
50K .......... .......... .......... .......... ......    100% 1,29M=0,1s

2016-06-24 02:05:21 (867 KB/s) - ‘/tmp/RtmpNmFBIZ/downloaded_packages/swirl_2.4.2.tar.gz’ saved [98565/98565]

  • 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: configuration failed for package ‘openssl’

  • removing ‘/home/alex/R/x86_64-pc-linux-gnu-library/3.2/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/alex/R/x86_64-pc-linux-gnu-library/3.2/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/alex/R/x86_64-pc-linux-gnu-library/3.2/swirl’
    Warning in install.packages :
    installation of package ‘swirl’ had non-zero exit status

The downloaded source packages are in
‘/tmp/RtmpNmFBIZ/downloaded_packages’

Most helpful comment

Use the following command to install libssl-dev in a command-line terminal:

sudo apt-get install libssl-dev

Then go back to R or Rstudio, use the standard commands to install and launch swirl:

install.packages("swirl")
library(swirl)
swirl()

Swirl should launch and proceed to install the course you want to take. Enjoy!

All 20 comments

What happens if you install httr on its own?

Hey Sean, thanks for your reply!
I already attempted installing httr and libssl-dev, but I get the following:

install.packages("httr")
Installing package into ‘/home/alex/R/x86_64-pc-linux-gnu-library/3.2’
(as ‘lib’ is unspecified)
also installing the dependency ‘openssl’

--2016-06-25 16:17:35-- https://cran.rstudio.com/src/contrib/openssl_0.9.4.tar.gz
Resolving cran.rstudio.com (cran.rstudio.com)... 54.192.45.189
Connecting to cran.rstudio.com (cran.rstudio.com)|54.192.45.189|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1165388 (1,1M) [application/x-gzip]
Saving to: ‘/tmp/RtmpCDSN7C/downloaded_packages/openssl_0.9.4.tar.gz’

 0K .......... .......... .......... .......... ..........  4%  728K 1s
50K .......... .......... .......... .......... ..........  8%  726K 1s

100K .......... .......... .......... .......... .......... 13% 1,71M 1s
150K .......... .......... .......... .......... .......... 17% 1,95M 1s
200K .......... .......... .......... .......... .......... 21% 1,16M 1s
250K .......... .......... .......... .......... .......... 26% 1,71M 1s
300K .......... .......... .......... .......... .......... 30% 1,82M 1s
350K .......... .......... .......... .......... .......... 35% 1,60M 1s
400K .......... .......... .......... .......... .......... 39% 2,12M 1s
450K .......... .......... .......... .......... .......... 43% 1,85M 0s
500K .......... .......... .......... .......... .......... 48% 2,19M 0s
550K .......... .......... .......... .......... .......... 52% 1,98M 0s
600K .......... .......... .......... .......... .......... 57% 5,72M 0s
650K .......... .......... .......... .......... .......... 61% 2,08M 0s
700K .......... .......... .......... .......... .......... 65% 1,93M 0s
750K .......... .......... .......... .......... .......... 70% 1,91M 0s
800K .......... .......... .......... .......... .......... 74% 7,72M 0s
850K .......... .......... .......... .......... .......... 79% 2,43M 0s
900K .......... .......... .......... .......... .......... 83% 2,72M 0s
950K .......... .......... .......... .......... .......... 87% 11,0M 0s
1000K .......... .......... .......... .......... .......... 92% 2,23M 0s
1050K .......... .......... .......... .......... .......... 96% 9,21M 0s
1100K .......... .......... .......... ........ 100% 13,1M=0,6s

2016-06-25 16:17:36 (1,92 MB/s) - ‘/tmp/RtmpCDSN7C/downloaded_packages/openssl_0.9.4.tar.gz’ saved [1165388/1165388]

--2016-06-25 16:17:36-- https://cran.rstudio.com/src/contrib/httr_1.2.0.tar.gz
Resolving cran.rstudio.com (cran.rstudio.com)... 54.192.45.189
Connecting to cran.rstudio.com (cran.rstudio.com)|54.192.45.189|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 133324 (130K) [application/x-gzip]
Saving to: ‘/tmp/RtmpCDSN7C/downloaded_packages/httr_1.2.0.tar.gz’

 0K .......... .......... .......... .......... .......... 38% 1,13M 0s
50K .......... .......... .......... .......... .......... 76%  671K 0s

100K .......... .......... .......... 100% 4,63M=0,1s

2016-06-25 16:17:36 (1,03 MB/s) - ‘/tmp/RtmpCDSN7C/downloaded_packages/httr_1.2.0.tar.gz’ saved [133324/133324]

  • 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: configuration failed for package ‘openssl’

  • removing ‘/home/alex/R/x86_64-pc-linux-gnu-library/3.2/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/alex/R/x86_64-pc-linux-gnu-library/3.2/httr’
    Warning in install.packages :
    installation of package ‘httr’ had non-zero exit status

The downloaded source packages are in
‘/tmp/RtmpCDSN7C/downloaded_packages’

When trying to install libssl-dev I get this:

install.packages("libssl-dev")
Installing package into ‘/home/alex/R/x86_64-pc-linux-gnu-library/3.2’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘libssl-dev’ is not available (for R version 3.2.3)

I checked on the CRAN website, and I believe the current R version is 3.3.xx, but when I attempt to update R I am told 3.2.3 is the current version. What should I do?

Thanks!

Hey @seankross,
Any suggestions? I am eager to continue with the next step in the course.
Thanks!

libssl-dev isn't an R package, you need to install it with apt-get. Have you tried installing libssl-dev on the command line?

I'm still an ubuntu noob. Everything worked now. Thank you!

Hello mralexpopa how did your problem get resolved as I am facing almost similar issues like yours?

worked... Thanks !!!

Worked for me too thanks!

Use the following command to install libssl-dev in a command-line terminal:

sudo apt-get install libssl-dev

Then go back to R or Rstudio, use the standard commands to install and launch swirl:

install.packages("swirl")
library(swirl)
swirl()

Swirl should launch and proceed to install the course you want to take. Enjoy!

Thanks saigoochang! I've been trying to solve this "swirl" problem for over 6months and never did it...until now!

Tks

sudo apt-get install libssl-dev worked perfectly. from last couple of days, i tried many things and internet is full of other confusing ways.

Thanks a lot saigoochang

@rrrongon @ccontipe
installing libssl-dev failed. The error is
WARNING: The following packages cannot be authenticated!
zlib1g-dev
Install these packages without verification? [y/N]
E: Some packages could not be authenticated

@seankross : can you update the wiki to include the needed step: sudo apt-get install libssl-dev ? Thanks!

I am unable to update the wiki page, please go ahead.

I think you need to be part of development team to edit the wiki

install libssl-dev using
sudo apt-get install libssl-dev
This helped me! @saigoochang Thank you

@seankross Can you add this solution to your wiki
Common Errors and Fixes

Tried a lot of other workarounds, but sudo apt-get install libssl-dev solved it for me. Thanks mralexpopa for posting and seankross for providing a working solution.

Use the following command to install libssl-dev in a command-line terminal:

sudo apt-get install libssl-dev

Then go back to R or Rstudio, use the standard commands to install and launch swirl:

install.packages("swirl")
library(swirl)
swirl()

Swirl should launch and proceed to install the course you want to take. Enjoy!

Thanks, saigoochang; was stuck on this issue for more than a day now.
:)

You are all welcome!

hello R world
I have almost the same ERROR:
I tried to install libssl-dev in terminal
$ sudo apt-get install libssl-dev
it work perfectly
but after returning to RStudio to do :
install.packages("swirl")
have this error
Installing package into ‘/home/hduser/R/x86_64-pc-linux-gnu-library/3.2’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependency ‘RCurl’ is not available
--2020-09-16 03:30:00-- http://cran.rstudio.com/src/contrib/swirl_2.4.5.tar.gz
Resolving cran.rstudio.com (cran.rstudio.com)... 99.86.154.95, 99.86.154.121, 99.86.154.117, ...
Connecting to cran.rstudio.com (cran.rstudio.com)|99.86.154.95|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 108847 (106K) [application/x-gzip]
Saving to: ‘/tmp/Rtmpp6iLcN/downloaded_packages/swirl_2.4.5.tar.gz’

 0K .......... .......... .......... .......... .......... 47%  545K 0s
50K .......... .......... .......... .......... .......... 94% 1.41M 0s

100K ...... 100% 67.4K=0.2s

2020-09-16 03:30:00 (484 KB/s) - ‘/tmp/Rtmpp6iLcN/downloaded_packages/swirl_2.4.5.tar.gz’ saved [108847/108847]

ERROR: dependency ‘RCurl’ is not available for package ‘swirl’

  • removing ‘/home/hduser/R/x86_64-pc-linux-gnu-library/3.2/swirl’
    Warning in install.packages :
    installation of package ‘swirl’ had non-zero exit status

The downloaded source packages are in
‘/tmp/Rtmpp6iLcN/downloaded_packages’

NOTICE that I am in R --version :
R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

Was this page helpful?
0 / 5 - 0 ratings