LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 03-08-2005, 11:47 AM   #1
squinn
LQ Newbie
 
Registered: Jul 2004
Posts: 25

Rep: Reputation: 15
gethostbyname() returns localhost


A program that I need to run will not work. When I try to run it, I get the following error:

*** Cannot identify 'squinnux' IP address. gethostbyname() returns localhost.

My /etc/hosts file is set to:

127.0.0.1 squinnux localhost.localdomain localhost

what can I do to get around this error?

Thanks!
 
Old 03-08-2005, 11:57 AM   #2
zymurgist
Member
 
Registered: Jan 2003
Location: Long Island
Distribution: Redhat 8.0
Posts: 109

Rep: Reputation: 15
First, squinnex should not be in that line. You should have a seperate line with your actual IP address and host name.
Code:
127.0.0.1      localhost.localdomain localhost
192.168.0.1  squinnex
Then /etc/sysconfig/network should have the following lines:
NETWORKING=yes
HOSTNAME=squinnex
 
  


Reply



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
Message from syslogd@localhost localhost kernel: Disabling IRQ #21 ylts Linux - Hardware 0 02-26-2005 08:01 AM
gethostbyname() error jnusa Programming 0 01-12-2005 04:56 AM
gethostbyname("localhost") sds Linux - Networking 4 01-06-2005 05:25 AM
Problem with # and gethostbyname lolilol Linux - Software 0 04-26-2004 05:29 AM
gethostbyname error for aimstr8 Linux - Security 7 03-09-2002 04:49 AM

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

All times are GMT -5. The time now is 12: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