I am trying to install.packages("badger") in R 4.2.0 (ubuntu 20.04). But it says error 407 when it downloads some file:
.....
* installing *source* package 'gert' ...
** package 'gert' successfully unpacked and MD5 sums checked
** using staged installation
> curl::curl_download("https://r-lib.github.io/gert/get-libgit2-linux.sh","get-libgit2-linux.sh")
Error in curl::curl_download("https://r-lib.github.io/gert/get-libgit2-linux.sh", :
Received HTTP code 407 from proxy after CONNECT
Execution halted
Using PKG_CFLAGS=
Using PKG_LIBS=-lgit2
......
However:
- All other packages are installed perfectly fine.
- This exact file is also downloaded fine both in browser and in command line
curl https://r-lib.github.io/gert/get-libgit2-linux.sh
both from root and user. - This file gives the same error when i enter
curl::curl_download("https://r-lib.github.io/gert/get-libgit2-linux.sh","index.html")
in the R prompt. - But
curl::curl_download("https://github.com","index.html")
works fine. - But
curl::curl_download("https://google.com","index.html")
gives the same error 407. - When i set the proxy server with
Sys.setenv(https_proxy = )
andSys.setenv(https_proxy_user = )
, it does not help downloading the mentioned file with curl, moreover, the installation ends at even earlier stage saying:
Warning: unable to access index for repository https://cloud.r-project.org/src/contrib:
cannot open URL 'https://cloud.r-project.org/src/contrib/PACKAGES'
Warning message:
package 'badger' is not available for this version of R
- When i unset
https_proxy
andhttp_proxy
variables in bash, the installation freezes trying to download the index cos our company uses proxy server and there is no internet access without it:
> install.packages("badger")
Installing package into '/usr/local/lib/R/site-library'
(as 'lib' is unspecified)
^C
- When i both unset the proxy settings in bash and set them in R, the curl invocation gives the same error 407, and the installation says:
> install.packages("badger")
Installing package into '/usr/local/lib/R/site-library'
(as 'lib' is unspecified)
Error in readRDS(dest) : error reading from connection
What could it be and how can i get the curl working? Or how can i install the mentioned package without curl?
Thanks in advance.