Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Issues to install plotly under Ubuntu 16.04 using RStudio

Hi,

I used plotly on my Mac without any major issues in RStudio. Now I wanted to use it on my laptop with Ubuntu 16.04 and can’t find the library. I had no issues installing other packages.
Here is my code:

install.packages(“plotly”)
Installing package into ‘/home/johannes/R/x86_64-pc-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
also installing the dependencies ‘curl’, ‘openssl’, ‘httr’

trying URL 'https://cran.rstudio.com/src/contrib/curl_2.3.tar.gz
Content type ‘application/x-gzip’ length 400460 bytes (391 KB)

downloaded 391 KB

trying URL 'https://cran.rstudio.com/src/contrib/openssl_0.9.5.tar.gz
Content type ‘application/x-gzip’ length 1236042 bytes (1.2 MB)

downloaded 1.2 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/plotly_4.5.6.tar.gz
Content type ‘application/x-gzip’ length 735400 bytes (718 KB)

downloaded 718 KB

  • installing source package ‘curl’ …
    ** package ‘curl’ successfully unpacked and MD5 sums checked
    Package libcurl was not found in the pkg-config search path.
    Perhaps you should add the directory containing libcurl.pc' to the PKG_CONFIG_PATH environment variable No package 'libcurl' found Package libcurl was not found in the pkg-config search path. Perhaps you should add the directory containinglibcurl.pc’
    to the PKG_CONFIG_PATH environment variable
    No package ‘libcurl’ found
    Using PKG_CFLAGS=
    Using PKG_LIBS=-lcurl
    ------------------------- ANTICONF ERROR ---------------------------
    Configuration failed because libcurl was not found. Try installing:
  • deb: libcurl4-openssl-dev (Debian, Ubuntu, etc)
  • rpm: libcurl-devel (Fedora, CentOS, RHEL)
  • csw: libcurl_dev (Solaris)
    If libcurl is already installed, check that ‘pkg-config’ is in your
    PATH and PKG_CONFIG_PATH contains a libcurl.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 ‘curl’

  • removing ‘/home/johannes/R/x86_64-pc-linux-gnu-library/3.3/curl’
    Warning in install.packages :
    installation of package ‘curl’ had non-zero exit status
  • 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/johannes/R/x86_64-pc-linux-gnu-library/3.3/openssl’
    Warning in install.packages :
    installation of package ‘openssl’ had non-zero exit status
    ERROR: dependencies ‘curl’, ‘openssl’ are not available for package ‘httr’
  • removing ‘/home/johannes/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 ‘plotly’
  • removing ‘/home/johannes/R/x86_64-pc-linux-gnu-library/3.3/plotly’
    Warning in install.packages :
    installation of package ‘plotly’ had non-zero exit status

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

library(plotly)
Error in library(plotly) : there is no package called ‘plotly’

Thanks for your help

Looks like an issue with installing the dependency openssl. Have you tried reaching out to the maintainers of the openssl package?