Here is another great fix that I found in my daily struggles…
Here in my office, like most other corporate environments, we are behind a proxy server. This is simply a security and management resource used by many businesses both large and small. With most Windows machines, this is not a very large hurdle since there is only one place to change proxy settings and everything sort of, “comes together”.
Linux, on the other hand, is a bit different. There is the normal web browser proxy settings that most would find in a comparable system but there is also something called APT or YUM which is sort of a direct connection to update servers. The problem with this is that APT does not utilize or care about the proxy settings that you just put into Firefox.
Here is a quick rundown of what I’ve found out….
There are certain operating procedures in Linux that use multiple files in succession much like a bootable drive list.
10usb 20cdrom 30harddrive 40hardrive2
When the operating system sees this type of hierarchy, it knows to follow this like literal instructions. Read file 1, if conditions are met, stop. If conditions are not met, continue to second string.
In Ubuntu Linux and Linux Mint, APT also uses this type of “recipe.”
If you look in, /etc/apt/apt.conf.d, you will see
00trustcdrom 15update-stamp 20dbus 50unattended upgrades
01autoremove 20archive 70debconf 10periodic 20changelog 99update-notifier
Here is the procedure to work with and around this system…
1. Open a terminal session and log in as a root user (from the terminal prompt, type sudo -i, you will then be prompted to login with your sudo password)
2. From the root prompt, (root@ubuntu:~#), type cd ../etc/apt/apt.conf.d
3. You should now see root@ubuntu:/etc/apt/apt.conf.d#
4. Type gedit 30proxy
5. This will open a new “GEdit” window with a blank page.
6. In this window, type:
Where it says “YOURPROXYADDRESS:YOURPORTNUMBER”, make sure you change that to the correct information. For example, if your proxy is “http://proxy.google.com” and it uses port “8080”, then you will type “Acquire::http::Proxy”http://proxy.google.com:8080/”;”
7. From this point, select the save button at the top of the window and close out of all applications.
8. Open a new terminal window and simply type sudo apt-get update
9. You will once again be prompted for your password and you should see the update start downloading.
If this seems a little tricky and you need a hand, feel free to comment here and I will do my best to answer quickly.