After updating R and RStudio we cannot install any packages anymore.
Windows Server 2019
Proxy: McAfee MWG, configuration using PAC Script
RStudio Community
Global Options: Use Internet Explorer library/proxy for HTTP is set
Try to verify the following configuration was uncheckeded : Global option -> Packages->Use secure download method for HTTP.
You just have to uncheck it
As a workaround I set up a Nexus Repository OSS now but I can set this only as a fallback option (Secondary Repo). This means I have to wait a long time for every package as it first tries the direct non working way first.
What should I try from this thread? I can open the links with the browser without any issues.
Having to set http_proxy variables is not an option... and I didn't have success with it either.
The point is - it was working fine before the update....
This problem is caused by a change in R not RStudio. The R 4.2.0 changelog (link) says the following:
The (non-default and deprecated) method = "internal" for download.file() and url() no longer supports ββ http://β β nor ββ ftp://β β URIs. (It is used only for ββ file://β β URIs.)On Windows, download.file(method = "wininet") no longer supports ββ ftp://β β URIs. (It is no longer the default method, which is "libcurl" and does.)On Windows, the deprecated method = "wininet" now gives a warning for ββ http://β β and ββ https://β β URIs for both download.file() and url(). (It is no longer the default method.)
I've seen this on a corporate network and I can work around it by adding method = "wininet" when downloading packages eg install.packages("tidyverse", method = "wininet"). You'll get a warning but you should be able to use that until R4.3 comes out. Hopefully, we'll be able to get a fix before then.
I think I have the same issue on Linux system ( Ubuntu 22.04 LTS). Do you know what method I have to choose to solve this?
I'm using the last version of Rstudio with R 4.2.1.
My corporate PC is locked down so there is limited troubleshooting that I've been able to do. I don't have a problem on two other Windows 10 PCs that I use at home with the same RStudio and R versions - no pac file or proxy and nothing being blocked on my firewall. Something in the R4.2 change is broken for certain Windows setups.
My guess is that curl doesn't retrieve the proxy settings from windows.
And using http[s]_proxy environment variables is not an option. I need something which works out of the box.
I already had users set these variables on their systems and then they started to wonder why other applications didn't work anymore (like Postman), or why access to other internet sites was broken as we have direct connections to other internal sites which must not go though the proxy.
This is all set up with the proxy script and will be broken when you use these environment variables.