host不到本地主机名
/etc/resolv.conf 文件内容如下:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.0.1
/etc/network/interfaces 文件内容如下:
auto lo
iface lo inet loopback
/etc/hosts 文件内容如下:
127.0.0.1 localhost
127.0.1.1 CYWei
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
命令查看host情况,问题如下:
wcy@CYWei:~$ sudo gedit /etc/resolv.conf
wcy@CYWei:~$ sudo gedit /etc/network/interfaces
wcy@CYWei:~$ sudo gedit /etc/hosts
wcy@CYWei:~$ host localhost
localhost has address 127.0.0.1
localhost has IPv6 address ::1
wcy@CYWei:~$ host 127.0.0.1
1.0.0.127.in-addr.arpa domain name pointer localhost.
wcy@CYWei:~$ host CYWei
Host CYWei not found: 3(NXDOMAIN)
wcy@CYWei:~$ host 127.0.1.1
Host 1.1.0.127.in-addr.arpa. not found: 3(NXDOMAIN)
wcy@CYWei:~$ hostname
CYWei
wcy@CYWei:~$
host 127.0.0.1 或者 localhost 可以通
但是host 127.0.1.1 或者 CYWei(主机名)不通
安装torque出现的问题
-
- 帖子: 1
- 注册时间: 2014-03-13 23:29
- 系统: ubuntu
- 月下叹逍遥
- 论坛版主
- 帖子: 33994
- 注册时间: 2010-10-07 14:23
- 系统: Archdows10
- 来自: 某系某星某洲某国某省某市
- 联系:
-
- 论坛版主
- 帖子: 18279
- 注册时间: 2009-08-04 16:33
Re: 安装torque出现的问题
按下 alt + F2host不到本地主机名
輸入 gksudo gedit /etc/hosts
加入這一行
127.0.0.1 CYWei
儲存
一般可以立即生效
如果無效
重新啓動連線看看
備註
如果你是第一次使用 gksudo 指令
可能需要先安裝 gksu 套件
sudo apt-get install gksu
如果還是無效
sudo ifconfig lo
把結果複製貼上來