Can't use apt-get because of proxy issues

Asked by Iggy

I am using Ubuntu 15.10. I have been trying to use apt-get to install grace and fortran and gksu but it's always failed. I have also tried the following:

1. sudo apt-get update
2. sudo apt-get install grace
3. sudo env http_proxy=http://username:<email address hidden>:port apt-get update
4. editing my profile by adding export http_proxy=http://username:<email address hidden>:port (but it won't save because it says that I don't have permission to edit my profile)
5. deleting apt.conf file (but it won't allow me to delete it; access denied)

And the response for the rest was always:

Ign http://security.ubuntu.com wily-security InRelease
Ign http://ph.archive.ubuntu.com wily InRelease
Ign http://security.ubuntu.com wily-security Release.gpg
Ign http://ph.archive.ubuntu.com wily-updates InRelease
Ign http://security.ubuntu.com wily-security Release
Ign http://ph.archive.ubuntu.com wily-backports InRelease
Ign http://security.ubuntu.com wily-security/main Sources/DiffIndex
Ign http://security.ubuntu.com wily-security/restricted Sources/DiffIndex
Ign http://security.ubuntu.com wily-security/universe Sources/DiffIndex
Ign http://ph.archive.ubuntu.com wily Release.gpg
Ign http://security.ubuntu.com wily-security/multiverse Sources/DiffIndex
Ign http://security.ubuntu.com wily-security/main amd64 Packages/DiffIndex
Ign http://ph.archive.ubuntu.com wily-updates Release.gpg
Ign http://security.ubuntu.com wily-security/restricted amd64 Packages/DiffIndex
Ign http://ph.archive.ubuntu.com wily-backports Release.gpg
Ign http://security.ubuntu.com wily-security/universe amd64 Packages/DiffIndex
Ign http://security.ubuntu.com wily-security/multiverse amd64 Packages/DiffIndex
Ign http://ph.archive.ubuntu.com wily Release
Ign http://ph.archive.ubuntu.com wily-updates Release
Ign http://security.ubuntu.com wily-security/main i386 Packages/DiffIndex
Ign http://ph.archive.ubuntu.com wily-backports Release
Ign http://ph.archive.ubuntu.com wily/main Sources/DiffIndex
Ign http://security.ubuntu.com wily-security/restricted i386 Packages/DiffIndex
Ign http://security.ubuntu.com wily-security/universe i386 Packages/DiffIndex
Ign http://security.ubuntu.com wily-security/multiverse i386 Packages/DiffIndex
Ign http://ph.archive.ubuntu.com wily/restricted Sources/DiffIndex
Ign http://ph.archive.ubuntu.com wily/universe Sources/DiffIndex
Ign http://ph.archive.ubuntu.com wily/multiverse Sources/DiffIndex
Ign http://ph.archive.ubuntu.com wily/main amd64 Packages/DiffIndex
Ign http://ph.archive.ubuntu.com wily/restricted amd64 Packages/DiffIndex
Ign http://ph.archive.ubuntu.com wily/universe amd64 Packages/DiffIndex
Ign http://ph.archive.ubuntu.com wily/multiverse amd64 Packages/DiffIndex
Ign http://ph.archive.ubuntu.com wily/main i386 Packages/DiffIndex
Ign http://ph.archive.ubuntu.com wily/restricted i386 Packages/DiffIndex
Ign http://ph.archive.ubuntu.com wily/universe i386 Packages/DiffIndex
Ign http://ph.archive.ubuntu.com wily/multiverse i386 Packages/DiffIndex
Ign http://ph.archive.ubuntu.com wily-updates/main Sources/DiffIndex
Ign http://ph.archive.ubuntu.com wily-updates/restricted Sources/DiffIndex
Ign http://ph.archive.ubuntu.com wily-updates/universe Sources/DiffIndex
Ign http://ph.archive.ubuntu.com wily-updates/multiverse Sources/DiffIndex
Ign http://ph.archive.ubuntu.com wily-updates/main amd64 Packages/DiffIndex
Ign http://ph.archive.ubuntu.com wily-updates/restricted amd64 Packages/DiffIndex
Ign http://ph.archive.ubuntu.com wily-updates/universe amd64 Packages/DiffIndex
Ign http://ph.archive.ubuntu.com wily-updates/multiverse amd64 Packages/DiffIndex
Ign http://ph.archive.ubuntu.com wily-updates/main i386 Packages/DiffIndex
Ign http://ph.archive.ubuntu.com wily-updates/restricted i386 Packages/DiffIndex
Ign http://ph.archive.ubuntu.com wily-updates/universe i386 Packages/DiffIndex
Ign http://ph.archive.ubuntu.com wily-updates/multiverse i386 Packages/DiffIndex
Ign http://ph.archive.ubuntu.com wily-backports/main Sources/DiffIndex
Ign http://ph.archive.ubuntu.com wily-backports/restricted Sources/DiffIndex
Ign http://ph.archive.ubuntu.com wily-backports/universe Sources/DiffIndex
Ign http://ph.archive.ubuntu.com wily-backports/multiverse Sources/DiffIndex
Ign http://ph.archive.ubuntu.com wily-backports/main amd64 Packages/DiffIndex
Ign http://ph.archive.ubuntu.com wily-backports/restricted amd64 Packages/DiffIndex
Ign http://ph.archive.ubuntu.com wily-backports/universe amd64 Packages/DiffIndex
Ign http://ph.archive.ubuntu.com wily-backports/multiverse amd64 Packages/DiffIndex
Ign http://ph.archive.ubuntu.com wily-backports/main i386 Packages/DiffIndex
Ign http://ph.archive.ubuntu.com wily-backports/restricted i386 Packages/DiffIndex
Ign http://ph.archive.ubuntu.com wily-backports/universe i386 Packages/DiffIndex
Ign http://ph.archive.ubuntu.com wily-backports/multiverse i386 Packages/DiffIndex
Ign http://security.ubuntu.com wily-security/main Translation-en_PH
Ign http://security.ubuntu.com wily-security/main Translation-en
Ign http://security.ubuntu.com wily-security/multiverse Translation-en_PH
Ign http://security.ubuntu.com wily-security/multiverse Translation-en
Ign http://security.ubuntu.com wily-security/restricted Translation-en_PH
Ign http://security.ubuntu.com wily-security/restricted Translation-en
Ign http://security.ubuntu.com wily-security/universe Translation-en_PH
Ign http://security.ubuntu.com wily-security/universe Translation-en
Err http://security.ubuntu.com wily-security/main Sources
  407 Proxy Authentication Required
Err http://security.ubuntu.com wily-security/restricted Sources
  407 Proxy Authentication Required
Err http://security.ubuntu.com wily-security/universe Sources
  407 Proxy Authentication Required
Err http://security.ubuntu.com wily-security/multiverse Sources
  407 Proxy Authentication Required
Err http://security.ubuntu.com wily-security/main amd64 Packages
  407 Proxy Authentication Required
Err http://security.ubuntu.com wily-security/restricted amd64 Packages
  407 Proxy Authentication Required
Err http://security.ubuntu.com wily-security/universe amd64 Packages
  407 Proxy Authentication Required
Err http://security.ubuntu.com wily-security/multiverse amd64 Packages
  407 Proxy Authentication Required
Err http://security.ubuntu.com wily-security/main i386 Packages
  407 Proxy Authentication Required
Err http://security.ubuntu.com wily-security/restricted i386 Packages
  407 Proxy Authentication Required
Err http://security.ubuntu.com wily-security/universe i386 Packages
  407 Proxy Authentication Required
Err http://security.ubuntu.com wily-security/multiverse i386 Packages
  407 Proxy Authentication Required
Ign http://ph.archive.ubuntu.com wily/main Translation-en_PH
Ign http://ph.archive.ubuntu.com wily/main Translation-en
Ign http://ph.archive.ubuntu.com wily/multiverse Translation-en_PH
Ign http://ph.archive.ubuntu.com wily/multiverse Translation-en
Ign http://ph.archive.ubuntu.com wily/restricted Translation-en_PH
Ign http://ph.archive.ubuntu.com wily/restricted Translation-en
Ign http://ph.archive.ubuntu.com wily/universe Translation-en_PH
Ign http://ph.archive.ubuntu.com wily/universe Translation-en
Ign http://ph.archive.ubuntu.com wily-updates/main Translation-en_PH
Ign http://ph.archive.ubuntu.com wily-updates/main Translation-en
Ign http://ph.archive.ubuntu.com wily-updates/multiverse Translation-en_PH
Ign http://ph.archive.ubuntu.com wily-updates/multiverse Translation-en
Ign http://ph.archive.ubuntu.com wily-updates/restricted Translation-en_PH
Ign http://ph.archive.ubuntu.com wily-updates/restricted Translation-en
Ign http://ph.archive.ubuntu.com wily-updates/universe Translation-en_PH
Ign http://ph.archive.ubuntu.com wily-updates/universe Translation-en
Ign http://ph.archive.ubuntu.com wily-backports/main Translation-en_PH
Ign http://ph.archive.ubuntu.com wily-backports/main Translation-en
Ign http://ph.archive.ubuntu.com wily-backports/multiverse Translation-en_PH
Ign http://ph.archive.ubuntu.com wily-backports/multiverse Translation-en
Ign http://ph.archive.ubuntu.com wily-backports/restricted Translation-en_PH
Ign http://ph.archive.ubuntu.com wily-backports/restricted Translation-en
Ign http://ph.archive.ubuntu.com wily-backports/universe Translation-en_PH
Ign http://ph.archive.ubuntu.com wily-backports/universe Translation-en
Err http://ph.archive.ubuntu.com wily/main Sources
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily/restricted Sources
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily/universe Sources
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily/multiverse Sources
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily/main amd64 Packages
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily/restricted amd64 Packages
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily/universe amd64 Packages
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily/multiverse amd64 Packages
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily/main i386 Packages
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily/restricted i386 Packages
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily/universe i386 Packages
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily/multiverse i386 Packages
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily-updates/main Sources
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily-updates/restricted Sources
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily-updates/universe Sources
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily-updates/multiverse Sources
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily-updates/main amd64 Packages
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily-updates/restricted amd64 Packages
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily-updates/universe amd64 Packages
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily-updates/multiverse amd64 Packages
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily-updates/main i386 Packages
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily-updates/restricted i386 Packages
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily-updates/universe i386 Packages
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily-updates/multiverse i386 Packages
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily-backports/main Sources
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily-backports/restricted Sources
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily-backports/universe Sources
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily-backports/multiverse Sources
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily-backports/main amd64 Packages
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily-backports/restricted amd64 Packages
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily-backports/universe amd64 Packages
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily-backports/multiverse amd64 Packages
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily-backports/main i386 Packages
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily-backports/restricted i386 Packages
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily-backports/universe i386 Packages
  407 Proxy Authentication Required
Err http://ph.archive.ubuntu.com wily-backports/multiverse i386 Packages
  407 Proxy Authentication Required
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/wily-security/main/source/Sources 407 Proxy Authentication Required

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/wily-security/restricted/source/Sources 407 Proxy Authentication Required

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/wily-security/universe/source/Sources 407 Proxy Authentication Required

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/wily-security/multiverse/source/Sources 407 Proxy Authentication Required

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/wily-security/main/binary-amd64/Packages 407 Proxy Authentication Required

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/wily-security/restricted/binary-amd64/Packages 407 Proxy Authentication Required

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/wily-security/universe/binary-amd64/Packages 407 Proxy Authentication Required

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/wily-security/multiverse/binary-amd64/Packages 407 Proxy Authentication Required

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/wily-security/main/binary-i386/Packages 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily/main/source/Sources 407 Proxy Authentication Required

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/wily-security/restricted/binary-i386/Packages 407 Proxy Authentication Required

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/wily-security/universe/binary-i386/Packages 407 Proxy Authentication Required

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/wily-security/multiverse/binary-i386/Packages 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily/restricted/source/Sources 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily/universe/source/Sources 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily/multiverse/source/Sources 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily/main/binary-amd64/Packages 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily/restricted/binary-amd64/Packages 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily/universe/binary-amd64/Packages 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily/multiverse/binary-amd64/Packages 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily/main/binary-i386/Packages 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily/restricted/binary-i386/Packages 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily/universe/binary-i386/Packages 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily/multiverse/binary-i386/Packages 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily-updates/main/source/Sources 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily-updates/restricted/source/Sources 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily-updates/universe/source/Sources 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily-updates/multiverse/source/Sources 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily-updates/main/binary-amd64/Packages 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily-updates/restricted/binary-amd64/Packages 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily-updates/universe/binary-amd64/Packages 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily-updates/multiverse/binary-amd64/Packages 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily-updates/main/binary-i386/Packages 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily-updates/restricted/binary-i386/Packages 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily-updates/universe/binary-i386/Packages 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily-updates/multiverse/binary-i386/Packages 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily-backports/main/source/Sources 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily-backports/restricted/source/Sources 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily-backports/universe/source/Sources 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily-backports/multiverse/source/Sources 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily-backports/main/binary-amd64/Packages 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily-backports/restricted/binary-amd64/Packages 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily-backports/universe/binary-amd64/Packages 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily-backports/multiverse/binary-amd64/Packages 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily-backports/main/binary-i386/Packages 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily-backports/restricted/binary-i386/Packages 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily-backports/universe/binary-i386/Packages 407 Proxy Authentication Required

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/wily-backports/multiverse/binary-i386/Packages 407 Proxy Authentication Required

E: Some index files failed to download. They have been ignored, or old ones used instead.

Please help.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1
Revision history for this message
Iggy (genes-maylem) said :
#2

Hi, Manfred! I just tried that and I only got this response: You do not have the permissions necessary to save the file. Please check that you typed the location correctly and try again.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

You need to put the proxy settings in /etc/apt/apt.conf

There is a set way to add them. Lots of guides online.

Revision history for this message
Manfred Hampl (m-hampl) said :
#4

Which file did you try to change?

If you do not have the rights to change your own ~/.bashrc file, then something is severely misconfigured.
If you want to change /etc/apt/apt.conf, then you have to enable administrative authorizations , e.g. by using "sudo", e.g in a command like
sudo gedit /etc/apt/apt.conf

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

What is the output of the commands

ls -la ~/.bashrc
ls -lad ~
whoami

Revision history for this message
Iggy (genes-maylem) said :
#6

It worked! Thank you very much, Manfred! I was able to edit apt.conf using sudo gedit. Thanks again!!!

Revision history for this message
Manfred Hampl (m-hampl) said :
#7

Does package updating work now?

Revision history for this message
Iggy (genes-maylem) said :
#8

Yes! :)

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#9

Please mark as solved if the issue is as such.

Thanks

Can you help with this problem?

Provide an answer of your own, or ask Iggy for more information if necessary.

To post a message you must log in.