1

I'm having quite a strange behavior with wget since yesterday.

I can download files by using sudo wget, but when I try the same file with only wget, I can get this error:

yusufh@ubuntu-yuh:~$ wget http://www.kegel.com/wine/winetricks
--2010-12-17 09:34:11--  http://www.kegel.com/wine/winetricks
Resolving www.kegel.com... failed: Name or service not known.
wget: unable to resolve host address `www.kegel.com'

and with sudo wget:

yusufh@ubuntu-yuh:~$ sudo wget http://www.kegel.com/wine/winetricks
--2010-12-17 09:35:37--  http://www.kegel.com/wine/winetricks
Connecting to 127.0.0.1:5865... connected.
Proxy request sent, awaiting response... 200 OK
Length: 190672 (186K) [text/plain]
Saving to: `winetricks'

100%[==================================================================================================>] 190,672     --.-K/s   in 0.03s   

2010-12-17 09:35:37 (6.92 MB/s) - `winetricks' saved [190672/190672]

After the comments below, here is an update:

I can use Google Chrome or Firefox perfectly without running it as root.

I use ntlmaps to connect to the office proxy. So I need to use 127.0.0.1:5865 as the proxy for clients.

Result for env | grep -i proxy:

NO_PROXY=localhost,127.0.0.0/8,*.local,
http_proxy=127.0.0.1:5865
ftp_proxy=127.0.0.1:5865
all_proxy=socks://127.0.0.1:5865/
ALL_PROXY=socks://127.0.0.1:5865/
https_proxy=127.0.0.1:5865
no_proxy=localhost,127.0.0.0/8,*.local

while sudo env | grep -i proxy is empty!

HELP!

5
  • 1
    Are other programs able to resolve DNS names without being root? If not, what are the permissions on the files used by the NSS (Name Service Switch) system, including /etc/hosts and /etc/resolv.conf? Dec 17, 2010 at 5:56
  • Yes, I'm able to use Google chrome; that's about the only program that uses Internet without root.
    – Yusuf
    Dec 17, 2010 at 10:05
  • I just ran into this problem on Ubuntu 16 Sep 15, 2016 at 15:46
  • Have you tried setting proxy for wget @TrevorSullivan ? Check this or this.
    – Yusuf
    Sep 16, 2016 at 1:38
  • @Yusuf Thanks -- I don't use a proxy though. It turned out to actually be a disk space issue, haha. Pretty straightforward. Sep 18, 2016 at 17:53

3 Answers 3

3

Connecting to 127.0.0.1:5865... connected. Proxy request sent, awaiting response... 200 OK

What does it mean?

Hint: compare env | grep -i proxy with sudo env | grep -i proxy

2
  • nice pickup. I missed that at first glance.
    – benc
    Dec 17, 2010 at 8:22
  • I use ntlmaps to connect to the office proxy. So I need to use 127.0.0.1:5865 as the proxy for clients. env | grep -i proxy gives NO_PROXY=localhost,127.0.0.0/8,.local, http_proxy=127.0.0.1:5865 ftp_proxy=127.0.0.1:5865 all_proxy=socks://127.0.0.1:5865/ ALL_PROXY=socks://127.0.0.1:5865/ https_proxy=127.0.0.1:5865 no_proxy=localhost,127.0.0.0/8,.local, while sudo env | grep -i proxy is empty!
    – Yusuf
    Dec 17, 2010 at 10:09
0

OK, problem solved.

It was in fact a bug with the gnome-terminal of Ubuntu 10.04.

I found my answer here.

In brief, just do a

sudo apt-get install gnome-terminal

Then close the terminal and launch it again! Such a simple solution for such a big problem!! :D

That's why you should always keep you Ubuntu updated :P (I didn't want to upgrade because I wanted to test some other things first, and the Internet connection is quite slow here; but I think I'd better do it now!!)

0

I had this problem. I change My nameserver in /etc/resolv.conf to:

nameserver 8.8.8.8
1
  • Be careful with newer versions of Ubuntu though, the /etc/resolv.conf file is overwritten on each restart. You can still add it through /etc/network/interfaces though.
    – Yusuf
    Jul 19, 2014 at 12:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .