0

Full disclosure, I have already posted this same question on SO, but on advice am trying this forum instead! I originally posted this issue several months ago in RStudio Community which helped narrow the problem but still no resolution (https://community.rstudio.com/t/https-protocol-error-when-upgrading-from-r-3-6-to-r-4-0/88234/2).

Around 2018, I installed RStudio Server (free edition) with R 3.6.0 on a CentOS 7 server following the instructions found here: (https://s3.amazonaws.com/rstudio-server/rstudio-server-pro-0.98.507-admin-guide.pdf )

Everything has been working with no issues. Recently, I've needed to upgrade the version of R, and have installed R 4.0.0 following the instructions here: (https://docs.rstudio.com/resources/install-r/ )

After installation, package installation on command line or in the RStudio IDE threw the following error:

Protocol "https" not supported or disabled in libcurl

I checked libcurlVersion() which returned:

[1] "7.47.0"
attr(,"ssl_version")
[1] "none"
attr(,"libssh_version")
[1] ""
attr(,"protocols")
[1] "dict" "file" "ftp" "gopher" "http" "imap" "pop3" "rtsp"
[9] "smtp" "telnet" "tftp"

So I can see https isn't listed in the protocols. There is another version of curl (7.73.0) on the computer (located in /usr/bin/curl) which does have https listed in its protocols, so I need to point R to this version instead. How can I point R to this version of curl?

4
  • You should configure RStudio to use libcurl 7.73.0 instead of 7.47.0. It appears you can do that with PKG_CONFIG_PATH
    – Ramhound
    Commented Mar 17, 2021 at 15:38
  • Thanks for the feedback @Ramhound. I did some googling and went searching around for this variable and haven't had luck finding it on my system. Is it an R or RStudio environmental variable? Do you maybe have a reference you can direct me to where I can learn more? Thanks!
    – rachelette
    Commented Mar 23, 2021 at 15:38
  • I found reference to PKG_CONFIG_PATH I believe from a Stack Overflow question
    – Ramhound
    Commented Mar 23, 2021 at 15:59
  • Thanks @Ramhound, your hint led me to the solution!
    – rachelette
    Commented Apr 23, 2021 at 19:38

1 Answer 1

0

The main problem here was caused by installing R from precompiled libraries. To fix this I followed the instructions to install R from source (of course changing the URL in the curl step to the desired version of R):

https://docs.rstudio.com/resources/install-r-source/

Before running the compile step under "Build and install R" I set PKG_CONFIG_PATH=/usr/local/lib (which was the location of my libcurl 7.73.0) in the terminal, then followed the rest of the installation directions from there.

Finally, I edited the rserver.conf file to point to the new version of R, then restarted RStudio Sever and things are working fine.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .