Problem with proxy on ubuntu

Hi the Rstudio community,

I'm failed to use Rstudio with my professional proxy on Ubuntu 22.04 LTS. I use RStudio 2022.07.1+554 "Spotted Wakerobin" Release for Ubuntu Jammy.
I use R version 4.2.1 (2022-06-23) -- "Funny-Looking Kid".

So, I can't able to do the following things :

  • download new package,
  • update packages,
  • render quarto document,
  • knit .rmd files.

Indeed, when I try to update package with graphical interface I receive the following warning messages in terminal (it takes some times to appear):
unable to access index for repository https://cloud.r-project.org/src/contrib: cannot open URL 'https://cloud.r-project.org/src/contrib/PACKAGES'

So, I think Rstudio don't take into account my ~/.Renviron file as if I disconnect from my professional network ad use my smartphone as a modem (without changing my ~/.Renviron) I don't have network issue anymore.

To help me, here my system environment parameters (get by Sys.getenv() command):
_ /usr/bin/dbus-update-activation-environment
R_CHECK_COMPILATION_FLAGS_KNOWN -Wformat -Werror=format-security -Wdate-time
CLICOLOR_FORCE 1
CUDA_HOME /usr/local/cuda
DBUS_SESSION_BUS_ADDRESS unix:path=/run/user/1000/bus
DESKTOP_SESSION ubuntu
DISPLAY :1
EDITOR vi
GDMSESSION ubuntu
GIO_LAUNCHED_DESKTOP_FILE /usr/share/applications/rstudio.desktop
GIO_LAUNCHED_DESKTOP_FILE_PID 3858
GIT_ASKPASS rpostback-askpass
GJS_DEBUG_OUTPUT stderr
GJS_DEBUG_TOPICS JS ERROR;JS LOG
GNOME_DESKTOP_SESSION_ID this-is-deprecated
GNOME_SHELL_SESSION_MODE ubuntu
GPG_AGENT_INFO /run/user/1000/gnupg/S.gpg-agent:0:1
GTK_MODULES gail:atk-bridge
HOME /home/fgardavaud
http_proxy http://username:password@proxym-inter.aphp.fr:8080/
IM_CONFIG_PHASE 1
INVOCATION_ID 493e4e6ef6c44284baf3c7cef86dc6eb
JOURNAL_STREAM 8:49474
LANG fr_FR.UTF-8
LD_LIBRARY_PATH /usr/lib/R/lib::/usr/local/cuda/lib64:/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/jvm/default-java/lib/server::/usr/local/cuda/lib64
LN_S ln -s
LOGNAME fgardavaud
MAKE make
MANAGERPID 1816
MPLENGINE tkAgg
PAGER /usr/bin/pager
PATH /usr/local/cuda/bin:/home/fgardavaud/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/usr/lib/rstudio/bin/quarto/bin:/usr/lib/rstudio/bin/postback
PWD /home/fgardavaud
PYTHONIOENCODING utf-8
QT_ACCESSIBILITY 1
QT_IM_MODULE ibus
R_BROWSER xdg-open
R_BZIPCMD /bin/bzip2
R_CLI_HAS_HYPERLINK_IDE_HELP true
R_CLI_HAS_HYPERLINK_IDE_RUN true
R_CLI_HAS_HYPERLINK_IDE_VIGNETTE true
R_DOC_DIR /usr/share/R/doc
R_GZIPCMD /bin/gzip -n
R_HOME /usr/lib/R
R_INCLUDE_DIR /usr/share/R/include
R_LIBS_SITE /usr/local/lib/R/site-library/:/usr/lib/R/site-library:/usr/lib/R/library
R_LIBS_USER /home/fgardavaud/R/x86_64-pc-linux-gnu-library/4.2
R_PAPERSIZE letter
R_PAPERSIZE_USER a4
R_PDFVIEWER /usr/bin/xdg-open
R_PLATFORM x86_64-pc-linux-gnu
R_PRINTCMD /usr/bin/lpr
R_RD4PDF times,inconsolata,hyper
R_SESSION_TMPDIR /tmp/RtmpsPoeRs
R_SHARE_DIR /usr/share/R/share
R_STRIP_SHARED_LIB strip --strip-unneeded
R_STRIP_STATIC_LIB strip --strip-debug
R_SYSTEM_ABI linux,gcc,gxx,gfortran,gfortran
R_TEXI2DVICMD /usr/bin/texi2dvi
R_UNZIPCMD /usr/bin/unzip
R_ZIPCMD /usr/bin/zip
RMARKDOWN_MATHJAX_PATH /usr/lib/rstudio/resources/mathjax-27
RS_PPM_FD_READ 33
RS_PPM_FD_WRITE 34
RS_RPOSTBACK_PATH /usr/lib/rstudio/bin/rpostback
RS_SHARED_SECRET a1dbe89a-94c7-4732-99c8-e208d74f678c
RSTUDIO 1
RSTUDIO_CLI_HYPERLINKS true
RSTUDIO_CONSOLE_COLOR 256
RSTUDIO_CONSOLE_WIDTH 151
RSTUDIO_PANDOC /usr/lib/rstudio/bin/quarto/bin/tools
RSTUDIO_PROGRAM_MODE desktop
RSTUDIO_SESSION_PID 3912
RSTUDIO_SESSION_PORT 56156
RSTUDIO_USER_IDENTITY fgardavaud
RSTUDIO_WINUTILS bin/winutils
SED /bin/sed
SESSION_MANAGER local/fgardavaud-HP-Z4-G4-Workstation:@/tmp/.ICE-unix/2028,unix/fgardavaud-HP-Z4-G4-Workstation:/tmp/.ICE-unix/2028
SHELL /bin/bash
SHLVL 0
SSH_AGENT_LAUNCHER gnome-keyring
SSH_AUTH_SOCK /run/user/1000/keyring/ssh
SYSTEMD_EXEC_PID 2046
TAR /bin/tar
TERM xterm-256color
USER fgardavaud
USERNAME fgardavaud
WINDOWPATH 2
XAUTHORITY /run/user/1000/gdm/Xauthority
XDG_CONFIG_DIRS /etc/xdg/xdg-ubuntu:/etc/xdg
XDG_CURRENT_DESKTOP ubuntu:GNOME
XDG_DATA_DIRS /usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
XDG_MENU_PREFIX gnome-
XDG_RUNTIME_DIR /run/user/1000
XDG_SESSION_CLASS user
XDG_SESSION_DESKTOP ubuntu
XDG_SESSION_TYPE x11
XMODIFIERS @im=ibus

My ~/.Renviron file contains the following lines :
options(internet.info = 0)
http_proxy="http://user:password@proxym-inter.aphp.fr:8080/"

I have to mention my password contains an exclamation mark for special character and I convert it by %21.
My username contains only number.
In my Rstudio global option, I unchecked "Use secure download method for HTTP".

I have the same ~/.Renviron file in my macOS station and it works on the same professional network.

Could you please help me to solve this issue.

Just to let you know, I tried to install package with R (r-base) and I have the same behavior (not working with my proxy).
I really don't know what to do ?

Hi Rstudio community,

I finally find the solution.
I have to edit the /etc/wgetrc file to enable proxy and then create a ~/.Rprofile with the following lines :
options(internet.info = 0)
options(download.file.method = "wget")

I don't know why I have a network problem previously ???

I hope wget method will be available in the next releases of R and Rstudio.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.