LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1058|回复: 5

新装的2005.1,startx时hostname lookup failure

[复制链接]
发表于 2006-2-7 19:47:55 | 显示全部楼层 |阅读模式
新装的2005.1

startx的时候第一行错误就是hostname: hosename lookup failure

我echo $HOSTNAME确能看到hostname,但是执行hostname -s确实找不到hostname

PS:2005.1不再使用/etc/hostname这个文件而是使用/etc/conf.d/hostname
 楼主| 发表于 2006-2-7 20:05:53 | 显示全部楼层
另外,gnome启动的时候显示

Could not look up internet address for atfa.
This will prevent GNOME from operating correctly.
It may be possible to correct the problem by adding
atfa to the file /etc/hosts.

是不是和这个也有关系呢
回复 支持 反对

使用道具 举报

发表于 2006-2-7 20:49:37 | 显示全部楼层
net.lo 启动了么?
回复 支持 反对

使用道具 举报

发表于 2006-2-7 20:51:46 | 显示全部楼层
我的这样没问题
amorous@Athena ~ $ cat /etc/hosts
# /etc/hosts
#
# This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem.  It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server.  Just add the names, addresses
# and any aliases to this file...
#
127.0.0.1       Athena.Amorous
127.0.0.1       Athena
127.0.0.1       localhost
# IPV6 versions of localhost and co
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

amorous@Athena ~ $ cat /etc/conf.d/hostname
# /etc/conf.d/hostname

# Set to the hostname of this machine
HOSTNAME="Athena.Amorous"
回复 支持 反对

使用道具 举报

发表于 2006-2-8 01:54:11 | 显示全部楼层
LS的正确,ke安装的doc里边就是这么说的。
回复 支持 反对

使用道具 举报

发表于 2006-2-8 09:13:35 | 显示全部楼层
同意4楼的
并且
127.0.0.1 Athena.Amorous
127.0.0.1 Athena
127.0.0.1 localhost
这三个不能颠倒
比如写成127.0.0.1 Athena Athena.Amorous localhost的话
会出现 Athena.(none)
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表