SOS: I can connect to internet but cannot update or add new software from universe

Asked by haznizul

Hai. I'm new in using Linux. I've installed Feisty Fawn in my computer and it was great. I can connect to the internet, I can update and add new software. However, after several times add new software from universe, I've got these messages:

W: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/s/samba/smbclient_3.0.24-2ubuntu1.1_i386.deb
  Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)

W: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/s/samba/samba-common_3.0.24-2ubuntu1.1_i386.deb
  Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)

W: Failed to fetch http://wine.budgetdedicated.com/apt/pool/main/w/wine/wine-dev_0.9.37~winehq0~ubuntu~7.04-1_i386.deb
  Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)

I cannot update and add new software anymore even though I can access the Internet. Please help me. Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
haznizul
Solved:
Last query:
Last reply:
Revision history for this message
Jeff Martin (evilgourmet) said :
#1

Hello,

Can you post the information in your ' /etc/apt/sources.list ' file?
So we can help you get apt working right.

Thank you,

Jeff

Revision history for this message
haznizul (haznizul) said :
#2

My /etc/apt/sources.list sreenshoots:

http://haznizul.googlepages.com/1.png
http://haznizul.googlepages.com/2.png
http://haznizul.googlepages.com/3.png
http://haznizul.googlepages.com/4.png
http://haznizul.googlepages.com/5.png

Please click the links to see the sources.list info. Thanks for your quick response.

Revision history for this message
Jeff Martin (evilgourmet) said :
#3

Try this first,

'sudo apt-get update' from a terminal window.

It will retrieve the information for new servers and repositories, and show you that progress in the terminal.

Let me know how that works out.

Revision history for this message
haznizul (haznizul) said :
#4

I've applied the command in terminal and this is the message that I've got:

zul@zul-desktop:~$ sudo apt-get update
Err http://wine.budgetdedicated.com feisty Release.gpg
  Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Err http://wine.budgetdedicated.com feisty/main Translation-en_US
  Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Err http://ftp.osuosl.org feisty/ Release.gpg
  Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Err http://ftp.osuosl.org feisty/ Translation-en_US
  Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Err http://my.archive.ubuntu.com feisty Release.gpg
  Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Err http://my.archive.ubuntu.com feisty/main Translation-en_US
  Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Err http://my.archive.ubuntu.com feisty/restricted Translation-en_US
  Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Err http://my.archive.ubuntu.com feisty/universe Translation-en_US
  Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Err http://my.archive.ubuntu.com feisty/multiverse Translation-en_US
  Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Err http://my.archive.ubuntu.com feisty-updates Release.gpg
  Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Err http://my.archive.ubuntu.com feisty-updates/main Translation-en_US
  Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Err http://my.archive.ubuntu.com feisty-updates/restricted Translation-en_US
  Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Err http://security.ubuntu.com feisty-security Release.gpg
  Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Err http://security.ubuntu.com feisty-security/main Translation-en_US
  Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Err http://security.ubuntu.com feisty-security/restricted Translation-en_US
  Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Err http://security.ubuntu.com feisty-security/universe Translation-en_US
  Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Err http://security.ubuntu.com feisty-security/multiverse Translation-en_US
  Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Failed to fetch http://my.archive.ubuntu.com/ubuntu/dists/feisty/Release.gpg Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Failed to fetch http://my.archive.ubuntu.com/ubuntu/dists/feisty/main/i18n/Translation-en_US.bz2 Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Failed to fetch http://my.archive.ubuntu.com/ubuntu/dists/feisty/restricted/i18n/Translation-en_US.bz2 Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Failed to fetch http://my.archive.ubuntu.com/ubuntu/dists/feisty/universe/i18n/Translation-en_US.bz2 Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Failed to fetch http://my.archive.ubuntu.com/ubuntu/dists/feisty/multiverse/i18n/Translation-en_US.bz2 Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Failed to fetch http://my.archive.ubuntu.com/ubuntu/dists/feisty-updates/Release.gpg Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Failed to fetch http://my.archive.ubuntu.com/ubuntu/dists/feisty-updates/main/i18n/Translation-en_US.bz2 Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Failed to fetch http://my.archive.ubuntu.com/ubuntu/dists/feisty-updates/restricted/i18n/Translation-en_US.bz2 Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Failed to fetch http://security.ubuntu.com/ubuntu/dists/feisty-security/Release.gpg Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Failed to fetch http://security.ubuntu.com/ubuntu/dists/feisty-security/main/i18n/Translation-en_US.bz2 Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Failed to fetch http://security.ubuntu.com/ubuntu/dists/feisty-security/restricted/i18n/Translation-en_US.bz2 Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Failed to fetch http://security.ubuntu.com/ubuntu/dists/feisty-security/universe/i18n/Translation-en_US.bz2 Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Failed to fetch http://security.ubuntu.com/ubuntu/dists/feisty-security/multiverse/i18n/Translation-en_US.bz2 Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Failed to fetch http://ftp.osuosl.org/pub/pculture.org/democracy/linux/repositories/ubuntu/feisty/Release.gpg Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Failed to fetch http://ftp.osuosl.org/pub/pculture.org/democracy/linux/repositories/ubuntu/feisty/en_US.bz2 Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Failed to fetch http://wine.budgetdedicated.com/apt/dists/feisty/Release.gpg Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Failed to fetch http://wine.budgetdedicated.com/apt/dists/feisty/main/i18n/Translation-en_US.bz2 Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
Reading package lists... Done
W: Some index files failed to download, they have been ignored, or old ones used instead.

Revision history for this message
Istvan Szekeres (szekeres) said :
#5

Hello,

For some reason apt-get tries to connect to your own computer (localhost on port 4001) instead of the real target. Could you check your proxy settings, maybe they are wrong.

Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) said :
#6

(which you can find under System --> Preferences --> network proxy)

Revision history for this message
Best haznizul (haznizul) said :
#7

My proxy setting is dynamic, I believe this is the default setting. I don't do any changes to the setting.

Thanks everybody for your support. I've solved my problem, by reinstalling Ubuntu. I've reinstall it not only because this updating problem. But also because I've installed Ubuntu in my second physical hard disk (slave). I've Ms Windows on the master hard disk. Therefore, I need to use both hard disk all the time. I cannot disconnect the second hard disk and connect another hard disk to my computer. If I did i, I'll get Grub error message. So, I've reinstalled Ubuntu in the master disk. Thanks again.

Revision history for this message
haznizul (haznizul) said :
#8

I believe I've found the factor that create this problem. The NVDIA driver. I've a NVDIA FX 5200 graphic card. Last time, I've installed the restricted driver for NVDIA to switch on the Desktop Effect. After that my computer was unable to connect to ubuntu server.

Then I reformat and reinstalled Ubuntu on my computer and try to download and install the NVDIA driver again. As a result, my computer faced the same problem. I've uninstalled the driver, but another problem occurred. After I restart my computer, I can see white screen only, not the nice GUI desktop of Ubuntu. I've resolved the problem by reinstalling Ubuntu again.

Revision history for this message
Paul Neaveill (boycotthell2005) said :
#9

Only one of my machines did similar. I tested the above steps and I discovered that it is not a problem with proxies (at least how I understand them) but with the loopback interface (LO) being the only option and I am not sure why. Even less, am not sure how to get back my network card on my media server. In attempting to troubleshoot this thing, I am not able to PING that machine from another one, nor can I ping its own address. What I can do is have the machine PING itself, but only on localhost. Yet, it can see the printserver. The machine is a Dell GX110 with standard video and Creative Labs SB LIVE! card.

Revision history for this message
turquoiz (shadow-dance) said :
#10

this is a common whenever there's a proxy set-up
ensure that any proxy packages like anon-proxy, proxify etc are completely removed not just purged via synaptic package manager or adept
also verify network proxy settings to have no proxies set up
reboot ....things shld be fine

Revision history for this message
Bobby B (hypercube24) said :
#11

Exactly the same thing happened to me. I installed Ubuntu on a Dell laptop, (Latitude D600) and the install was successful, but I got this message when using the update manager :W: Failed to fetch http://ca.archive.ubuntu.com/ubuntu/dists/gutsy/restricted/i18n/Translation-en_CA.bz2 Could not connect to 192.168.1.254:8080 (192.168.1.254). - connect (111 Connection refused),
   I checked the network settings( as they recommended) and found that the system was set up for a proxy. Apparently it did this automatically on setup!). After setting "direct connection to internet", I was able to proceed normally. Thanks for the excellent advice, it solved a VERY puzzling problem! ;-) Robert

Revision history for this message
rwb1959 (bbarrett) said :
#12

Hi All,

I am having the same problem:
 Could not connect to localhost:4001 (127.0.0.1). - connect (111 Connection refused)
...when trying to update. However, my settings already say "direct connection to the internet"
I too have a Dell D600. It seems that this began after my 1st update a week or so ago.
If anyone can give me some advice, I would appreciate it.
I'm running latest Ubuntu:
 2.6.24-19-generic #1 SMP Wed Aug 20 22:56:21 UTC 2008 i686 GNU/Linux

Thanks in advance

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#13

@rwb1959

Please don't append a new question on a marked as solved question.
Please make new question from here: https://answers.launchpad.net/ubuntu/+addquestion
you will get better chance to get right answer on a fresh tagged "open" question.
Solved question are usually not read from answering people.

Thank you

Revision history for this message
Manu Arya (axnlive) said :
#14

Please Try it

Hi, with the help of many others I've been able to fix this problem for good.
First bring up a terminal (shell prompt) with something like "Konsole" found under "System Tools" in the applications bar. Second, completely purge anon-proxy with the following command:

sudo apt-get purge anon-proxy
<AND ENTER YOUR PASSWORD>

(The above command works on my Ubuntu 7.10 OS)
(OR if you are running a system that does not do the sudo thing type the following:

su
<ENTER YOUR ROOT PASSWORD>
apt-get purge anon-proxy

PART TWO

Then type the following:

export HTTP_PROXY=
export http_proxy=

<and you are done!>

Note: To save yourself trouble like this simply don't install anon-proxy; it just messes things up. Use something like Tor instead if you need an anonymous proxy route to the Internet. It is located at http://www.torproject.org or (formerly) http://tor.eff.org. On their site they also note that you should download the software from their own site rather than Ubuntu's repositories because the software is the latest and greatest when retreived from torproject.org rather than the "universe" or "multiverse" repositories that the Ubuntu people provide.

If this still doesn't work then also try what Movius posted on http://forums.debian.net/viewtopic.php?p=1209 when he said the following:

PostPosted: 2007-11-11 13:57 Post subject: Another thing Reply with quote
Another thing you have to do is look with the "ifconfig" if the lo {loopback} is activated,
in affirmative case

gedit /etc/network/interfaces

and then

delete or put a # in the lines to make it like this :

# The loopback network interface
# auto lo
# iface lo inet loopback

Good luck

If you do choose to use Movius' suggestion make sure that you ONLY put the # sign in front of text; if you delete it and you want to change it back to what it was you may not remember what used to be printed there. The number sign (#) simply "comments out" the instructions, so that the instructions for the computer are translated to be simply notes to the computer operator rather than actual commands to act on. Following these instructions will fix your problem. It worked for me. But DO NOT do what Movius has said to do UNLESS Part One and Part Two combined are unsuccessful. Part#1+Part#2 should work on most every system. Use Movius' suggestion only if Part#1 and Part#2 do not work for you.

Anyhow, I'm apt-getting away now. Yay! L8r

P.S. Regarding Movius' post: You can replace gedit with whatever text editor you want. The command runs a text editor which opens the file /etc/network/interfaces

Revision history for this message
bobblesmurf (bootsa) said :
#15

I had the same issue after doing a distribution upgrade from Jaunty (9.04) to Karmic (9.10). None of the above helped.

Looking through /etc/apt directory I found a file called 01proxy in the apt.conf.d sub-directory that seemed to relate so in terminal I:

sudo gedit /etc/apt/apt.conf.d/01proxy

and commented out the line that referred to localhost (using // not # - as other files in the sub-directory commented in this manner) - only 1 line in the file anyway.

Sure enough, after a restart, problem solved - update manager works like usually :)