5

How do I install applications using yaourt under proxy network. For pacman I can simply use:

export http_proxy=http://usernm:passwd@link:port
sudo -E pacman -S application

But how do I do this for yaourt as it is not used with sudo priveledges.

Moithil Biswas
  • 153
  • 1
  • 8

2 Answers2

11

I would advise to use a solid proxying tool for all (or most) of your proxy needs.

$ proxychains4 yaourt -S application

proxychains-ng works well - but be sure to configure proxychains.conf before using.

anonimal
  • 401
  • 4
  • 6
7

You can edit /etc/sudoers with the visudo command and add this line

Defaults env_keep += "http_proxy https_proxy ftp_proxy"

This pass the current user environment variables to the command excecuted under sudo, is the same as sudo -E some_command but automatically, you need this because yaourt internally uses sudo pacman and not sudo -E pacman

This is the Arch wiki page about Proxy Settings

carpinchosaurio
  • 333
  • 3
  • 15