Unable to install plotly and devtools in rstudio server installed in Ubuntu on AWS?

I have created an EC2 instance in AWS(with Ubuntu), installed r studio server, but when I am trying to install the plotly package it gives an error related to OpenSSL:

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

Also, I have tried to install devtools but no luck. Please help as this is the only part where I am stuck?


1 answer

  • answered 2018-01-14 19:59 Ralf Stubner

    As the error message tells you, you need to install (the development files for) libcurl:

    sudo apt-get install libcurl4-openssl-dev

    There might be more such error messages down the road.

    An interesting alternative to manual installation is to use binary packages, since their dependencies are handled automatically. See http://dirk.eddelbuettel.com/blog/2017/12/22/#014_finding_binary_deb_packages for details.