13

Issue

Unable to install a few R packages (statistical programming language) since updating from 16.04 to Ubuntu 18.04. The problem is related to the use of the shared library libcurl. More precisely:

/usr/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_3' not    
found (required by /home/avila/R/x86_64-pc-linux-gnu-library/3.4/curl
/libs/curl.so)

sofar, I tried...

  • ... to install a previous version of libcurl with sudo apt-get install libcurl3, but other libraries were uninstalled on the procedure and R was not usable.

error output

When trying to install package called "forecast", for example:

install.packages("forecast")
 installing to /home/avila/R/x86_64-pc-linux-gnu-library/3.4/forecast/libs
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Error in dyn.load(file, DLLpath = DLLpath, ...) :  unable to load shared
object '/home/avila/R/x86_64-pc-linux-gnu-library/3.4/curl/libs/curl.so':
/usr/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_3' not    
found (required by /home/avila/R/x86_64-pc-linux-gnu-library/3.4/curl
/libs/curl.so)

ERROR: lazy loading failed for package ‘forecast’
* removing ‘/home/avila/R/x86_64-pc-linux-gnu-library/3.4/forecast’
Warning in install.packages :
installation of package ‘forecast’ had non-zero exit status

other info:

  • R version 3.4.4 (2018-03-15)
  • Platform: x86_64-pc-linux-gnu (64-bit)
avila
  • 563
  • 1
  • 6
  • 21

3 Answers3

7

It seems that to get predictive results you may want to start with renaming your existing R personal library with:

mv /home/$USER/R /home/$USER/R_old

Also install development package of curl:

sudo apt-get install libcurl4-openssl-dev

And then try to install your R-package from R-terminal:

$ R
install.packages("forecast")
N0rbert
  • 97,162
  • 34
  • 239
  • 423
  • 1
    thanks for your help. it worked. Please see edited question. Should I just slowly reinstall the needed packages or is there a way to find out which package was causing conflicts? :) – avila May 15 '18 at 19:37
  • 1
    The problem was linkage to libcurl from previous Ubuntu version. I do not know the full list of your packages. So consider to reinstall all of them. If my answer helped, you may accept it. – N0rbert May 15 '18 at 21:39
4

My resolution came from the Rstudio boards: https://community.rstudio.com/t/error-version-curl-openssl-3-not-found/8090

Simply removing the R curl package and reinstalling (along with devtools etc.) did the trick.

fosslinux
  • 3,771
  • 4
  • 28
  • 46
chepyle
  • 141
  • 2
1

I fix my problem after run: install.packages("RCurl")

Fábio
  • 241
  • 3
  • 8
  • 1
    This is the only thing that worked for me - I also tried re-installing the `curl` package and even reinstalled R. – Reilstein Jun 22 '19 at 00:44