EDA365电子论坛网

标题: 看看你的ARM嵌入式开发板无法ping localhost是不是同样的问题 [打印本页]

作者: mytomorrow    时间: 2020-3-4 09:53
标题: 看看你的ARM嵌入式开发板无法ping localhost是不是同样的问题
. z& I$ j% s) L  y$ I8 {+ d5 C
移植环境
! P" ~1 V  q; p* V$ z2 k% ~1,开发板:韦东山JZ2440。
1 U9 a2 z$ S+ }2 F' ~7 I2,linux 版本:linux-3.4.2
1 l" q2 M) m1 H  R; X2 |+ ?
$ y! V+ Y8 c9 O! c+ V: R) ?( ^在开发板上总是ping不通localhost* t" ?- c& G6 g4 Y% T
$ \# O& h* W' g$ E
[root@UnixHost lib]# ping localhost
; S5 g8 R, v* L$ u$ o# jping: bad address 'localhost'
5 w' N% Z+ x# J& m8 O" ]
- n/ W& K* L$ H! _2 M$ t按照参考文献的方法,so库也没少,/etc/hosts文件如下
" ]; E. i! y) y/ g
' ?7 H$ A2 Z( e) D& j[root@UnixHost lib]# cat /etc/hosts
  Q3 D) d' }; f2 A, f$ F! B, \0 b% H127.0.0.1        localhost
' J  `; T6 O% o127.0.1.1        book-desktop  S: N. D, j# J& \

$ `$ N5 {0 ?1 t) A0 D% }: \# The following lines are desirable for IPv6 capable hosts6 L4 a% Z( c$ D5 b
::1     localhost ip6-localhost ip6-loopback
4 g+ q4 m# y6 L/ b& ?最后,猜想是不是如参考文献所说的,少了/etc/nsswitch.conf文件?于是,从主机上拷贝该文件到开发板,再次尝试,成功ping通。
( z& K  e7 n8 C* U) M7 P: m  U2 X( @* i, }" Y. h; f! B6 I2 f6 E

作者: yin123    时间: 2020-3-4 17:36
ARM嵌入式开发板无法ping localhost是同样的问题




欢迎光临 EDA365电子论坛网 (https://bbs.eda365.com/) Powered by Discuz! X3.2