LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-17-2015, 04:50 AM   #1
handers1977
LQ Newbie
 
Registered: Jan 2015
Posts: 3

Rep: Reputation: Disabled
Could'nt resolve hostname error


Hopefully I am posting this question on the right forum...
When I type in curl http;//www.google.com i get the error message:
Could'nt resolve hostname

When I ping the ipaddress, i get a normal response.
Must be some dns problem but I am a newbie so I don't know where to look.

Who can help me?
Thanks a lot for your response!

Last edited by handers1977; 01-17-2015 at 04:51 AM. Reason: Extra scentence
 
Old 01-17-2015, 05:07 AM   #2
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Can you otherwise access web pages?
Is the curl only program showing such error?

Usually you have setup nameservers in /etc/resolv.conf

Like:

nameserver 8.8.8.8
nameserver 8.8.4.4

If your resolv.conf file doesn't has nameserver lines then you try putting it and running curl again. If they are present then comment them out with '#' at start and put these lines and try curl again. Also have you setup your networking to connect to internet?
 
Old 01-17-2015, 05:22 AM   #3
handers1977
LQ Newbie
 
Registered: Jan 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thanks a lot for your supersonic quick reply!
I think that this will be the solution.
I can Ping external ipadresses so i think i am connected to the internet.

Do i need to restart anything?
Do i have to use the nameserver of my service proviser
 
Old 01-17-2015, 05:36 AM   #4
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
You don't have to start/restart anything. You can use your ip address of your service provider for DNS.

Or else you can use the ip address I posted. They are google public Domain Name Servers.

The DNS translates the website(domain part) name to ip address and then using that ip address all the program connect to internet servers.
 
Old 01-17-2015, 06:48 AM   #5
handers1977
LQ Newbie
 
Registered: Jan 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled
Works perfect, thanks for your help!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How I can resolve the error Postfix? warning: hostname does not resolve to address kanzer Linux - Server 1 03-22-2013 08:56 AM
clients CAN resolve hostname of server w/nslookup, but CANNOT access by hostname WTF? psycroptic Linux - Networking 9 11-10-2012 11:24 AM
SliTasz/Linux 3.0 with error <cannot resolve hostname> leerose Linux - Networking 2 05-19-2011 12:00 AM
mount -t smbfs error can't resolve hostname FLLinux Linux - Networking 1 09-25-2009 01:49 AM
Resolve hostname from IP cornish Linux - Networking 10 10-10-2007 10:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration