Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Linux and Unix
Tag Cloud
access acer asus bios bsod computer crash desktop driver drivers error ethernet excel freeze gaming hard drive hardware hdmi internet laptop malware memory modem monitor motherboard network printer problem ram registry router security slow software sound toshiba trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Linux and Unix >
Solved: Ubuntu: Package Installers "Fail to fetch"

Reply  
Thread Tools
snorkytheweasel's Avatar
Computer Specs
Member with 215 posts.
 
Join Date: May 2006
Experience: UNIX/VMS:Elder Geek; DOS/
30-Aug-2007, 03:48 PM #1
Solved: Ubuntu: Package Installers "Fail to fetch"
I'm trying to use aptitude (from the terminal) and synaptic (from Gnome) to install programs (in this case, VLC Media Player).

Using either package manager, the installation fails immediately and throws this error message:

'W: Failed to fetch http://archive.ubuntu.com/ubuntu/poo...7.4-7_i386.deb
Could not resolve "10.1.1.3:3128" '

Interestingly, I can fetch the file http://archive.ubuntu.com/ubuntu/poo...7.4-7_i386.deb if I use the address bar in Firefox.

I infer that the package managers cannot get past the proxy server - which IS 10.1.1.3 port 3128.

"Ah-ha!" I said to myself. "While Firefox reads its own configuration file to deal with the proxy, synaptic and aptitude do not use their own configuration files. They must be reading a system-wide configuration file."

Then I added, "Self (I call myself 'Self'), you'll have to configure the system-wide proxy settings using System -> Preferences -> Network Proxy"

So Self (that would be I) tried to do so. The configuration panel says that the proxy for http is "10.1.1.3:3128" AND that the port is "3128". Hence the error condition when package managers try to do their jobs.

The bad news is that when I attempt to correct my OOPSIE! using System -> Preferences -> Network Proxy, I get this error:

'The application "gnome-network-preferences" attempted to change an aspect of your configuration that your system administrator or operating system vendor does not allow you to change. Some of the settings you have selected may not take effect, or may not be restored next time you use the application.'

For most, if not all, other restricted actions, Ubuntu prompts me for the password required for performing administrative tasks. Since I know both the password (I created it) AND the secret handshake, I should be able to perform this fix. In this case, The password prompt never appears. Knowing the password (and secret handshake), and being ready to use them, doesn't mean anything.

Note: I tried the old Windows do-it-all tactic: rebooting. That didn't help.

The quandry:
  1. Gnome blocks me from making needed changes
  2. Gnome doesn't ask for a password to enable making those changes
  3. Gnome won't let me use sudo to make the changes
  4. Gnome won't let me log on as root
  5. Gnome won't let me change to root
Note the interesting quirk in this: clearly, I configured that proxy setting at some point in time. At that time
  • I must have assumed that "10.1.1.3:3128" was the correct syntax... in some applications that IS a syntactally correct statement (probably something in our old nemesis, Windows)
  • Gnome must have allowed me to do said configuration
Now what do I (aka 'Self') do? I'm quite content to do this from the Command Line Interface, if that's what it takes.

PS: this smells like a bug, nicht wahr?

If so, whose bug is it? Gnome? Ubuntu?

Thanks in advance, and have a great August
lotuseclat79's Avatar
Distinguished Member with 21,345 posts.
 
Join Date: Sep 2003
Location: -71.45091, 42.27841
30-Aug-2007, 05:09 PM #2
Ok, you manged to use the address bar to get the .deb file. Did you install it?

Here is how if you have not:

$ sudo dpkg -i package_file.deb (i.e. substitute the real package name of the .deb)

-- Tom
lotuseclat79's Avatar
Distinguished Member with 21,345 posts.
 
Join Date: Sep 2003
Location: -71.45091, 42.27841
30-Aug-2007, 05:33 PM #3
Note: your inference that the package managers cannot get past the proxy server do not exactly follow.

For example, firefox can get past the proxy server because it properly has the proxy server interface specified in Preferecnces>Advanced>Network>Settings>Manual Proxy Configuration

Issuing the wget command from a command line terminal window is a different interface than either Synaptic Package Manager or aptitude - ask Self to be sure about that!

Issue:
$ sudo apt-get update

Then from a root account try to issue:
export http_proxy="XXX.XXX.XXX.XXXort"
export ftp_proxy="XXX.XXX.XXX.XXXort"

it works fine in some console apps(wget ....)
Ref: https://answers.launchpad.net/ubuntu...+question/5466

-- Tom

P.S. I hate when the php software issues the symbol in the middle of something, so it does not include the space character in the following wrt port
export http_proxy="XXX.XXX.XXX.XXX: port"
export ftp_proxy="XXX.XXX.XXX.XXX: port"
__________________
The independence created by philosophical insight is - in my opinion - the mark of distinction
between a mere artisan or specialist and a real seeker after truth. - Einstein 1944
Imagination is more important than knowledge. - Einstein

Last edited by lotuseclat79; 30-Aug-2007 at 05:53 PM..
snorkytheweasel's Avatar
Computer Specs
Member with 215 posts.
 
Join Date: May 2006
Experience: UNIX/VMS:Elder Geek; DOS/
30-Aug-2007, 05:37 PM #4
Well, actually, it threw 24 "failed to fetch errors". I only listed the first one. I guess I could do this the hard way and download 23 more files via firefox... and then dpkg all of them.

I'd rather fix the real problem: how to get the package managers through the proxy server.

Then anything I want to install should work as intended.
lotuseclat79's Avatar
Distinguished Member with 21,345 posts.
 
Join Date: Sep 2003
Location: -71.45091, 42.27841
30-Aug-2007, 05:55 PM #5
I take it the export commands did not work?

Verify with the env command and they should show up when done successfully.

-- Tom
snorkytheweasel's Avatar
Computer Specs
Member with 215 posts.
 
Join Date: May 2006
Experience: UNIX/VMS:Elder Geek; DOS/
30-Aug-2007, 05:59 PM #6
This is why so many people "try" linux, thern run, screaming, back to windows.

export http_proxy="XXX.XXX.XXX.XXXort"
sudo: export: command not found

Do I have an "export" command on my system?
slocate export | grep bin
( null response )
I used " | grep bin " because that filters out the non-binary files

"Then from a root account try to issue...."

If you mean something other than sudo ...., I don't know to use a root account. On my older linux boxes, I could issue an "su" and then enter the root password to become root. On this one, however, when I enter the administrative password, I get
su: Authentication failure
Sorry.

So,
- export doesn't work because I have no export binary on the system
- the administrative password works with "sudo" but not with "su"

Maybe it's just me, but it seems to this noob that fixing the real problem - the proxy configuration - thereby enabling me to use a package manager with one command, is a better solution that using http or ftp 24 times before issuing who knows how many - and in what order - dpkg commands.

Sorry to be so difficult. the meds haven't kicked in yet.
lotuseclat79's Avatar
Distinguished Member with 21,345 posts.
 
Join Date: Sep 2003
Location: -71.45091, 42.27841
30-Aug-2007, 07:14 PM #7
Ok, time for a tutorial.

export is a builtin command for the bash shell.

From the ubuntu user account /home/ubuntu directory:
$ cd
$ echo export http_proxy="10.1.1.3:3128" >> .bashrc
$ echo export ftp_proxy="10.1.1.3:3128" >> .bashrc
$ tail .bashrc

That should verify that both export statements were appended to the .bashrc file.

Then issue the command: $ . .bashrc
[Note: there are two . . separated by a space before the bashrc]

Then retry the wget command. Did it work?

-- Tom
__________________
The independence created by philosophical insight is - in my opinion - the mark of distinction
between a mere artisan or specialist and a real seeker after truth. - Einstein 1944
Imagination is more important than knowledge. - Einstein
snorkytheweasel's Avatar
Computer Specs
Member with 215 posts.
 
Join Date: May 2006
Experience: UNIX/VMS:Elder Geek; DOS/
30-Aug-2007, 07:19 PM #8
To make a long story short, this worked
export http_proxy=http://10.1.1.3:3128

"Worked" means that aptitude liked the environment as shown in export -p

"Worked" does not mean, however, that
System -> Preferences -> Network Proxy"
is fixed.

It also does not mean that aptitude will continue to work after logout/login or after reboot. Time will tell.
lotuseclat79's Avatar
Distinguished Member with 21,345 posts.
 
Join Date: Sep 2003
Location: -71.45091, 42.27841
30-Aug-2007, 08:31 PM #9
If you have an installed system, and the export string as give above worked, then be sure to install it as with the echo command in both the root account .bashrc and the regualar user's .bashrc file in each user's home directory, i.e. /root/.bashrc for the root account and /home/ubuntu/.bashrc in the regular ubuntu user's account.

Then it should survive logout/login and reboot.

-- Tom
__________________
The independence created by philosophical insight is - in my opinion - the mark of distinction
between a mere artisan or specialist and a real seeker after truth. - Einstein 1944
Imagination is more important than knowledge. - Einstein
Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 11:50 PM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.