curl version error in RStudio Workbench running on Ubuntu 20.04

142 Views Asked by At

When restarting R (4.3.1) in a project inside RStudio Workbench running on Ubuntu 20.04 , I get the following error message:

Restarting R session...

Project...

$ /usr/local/bin/curl --version ----------------------------------------------
error in running command

Error executing '/usr/local/bin/curl --version': is your copy of curl functional?

When I run locate libcurl.so.4 in the terminal it shows multiple versions of libcurl on the system and in various locations:

/usr/lib/x86_64-linux-gnu/libcurl.so.4
/usr/lib/x86_64-linux-gnu/libcurl.so.4.6.0
/usr/local/lib/libcurl.so.4
/usr/local/lib/libcurl.so.4.8.0

I am not experienced with Linux or curl. Should libcurl be removed from /usr/local/?

1

There are 1 best solutions below

2
KRSpinelli On

I would check to see if curl is installed in /usr/local/bin/curl first.

Run the command:

file /usr/local/bin/curl

If you get something like "cannot open `/usr/local/bin/curl' (No such file or directory)" That means that R is likely looking for curl in /usr/local/bin/ but cannot find it. You can run:

where curl

To find out where the curl is on the file system and make sure it is installed. You can then add a symbolic link to curl in /usr/local/bin so that the curl binary can be called from the /usr/local/bin folder.

ln -s $(where curl) /usr/local/bin/curl

Then test that everything is working properly by running:

/usr/local/bin/curl --version

Symbolic links in linux are basically references to another filename on the system. More on that here if you're curious:

https://en.wikipedia.org/wiki/Symbolic_link