Simply PPAs are for non standard software or updates. We can find latest software or updates that doesn't normally provided by Ubuntu software center. So people add these PPAs to system in order to use latest softwares. Some times there might be risks of adding PPA.
On the command line you can add a PPA using
apt-add-repository
,e.g.:
sudo apt-add-repository ppa:strukturag/libde265
If you are connected to Internet through a proxy server above command will give an error.
e.g.:
Cannot add PPA: 'ppa:strukturag/libde265'.
Please check that the PPA name or format is correct.
This happens because root user is not aware of the proxy settings that a normal user has. Lets see how to fix that.
Adding PPA through a proxy server.
- First thing is exporting the proxy environment variable using following commands.
export http_proxy=http://host:port/
export https_proxy=https://host:port/
e.g.:
export http_proxy=http://cachex.pdn.ac.lk:3128/
export https_proxy=https://cachex.pdn.ac.lk:3128/ -
Now we have to export these environmental variables to root user. For that Whenever you use
sudo
command, usesudo -E
to export the environment variables of the user you are currently using.
e.g.:
sudo -E apt-add-repository ppa:strukturag/libde265
- First type
sudo visudo
in terminal. - Then add
Defaults env_keep="https_proxy"
to the end of the file. - Press
Ctrl+x to save and exit.
This may happen even if you have added your proxy using System Settings -> Network -> Network proxy or in /etc/apt/apt.conf or even in /home/$USER/.bashrc
No comments:
Post a Comment