ssh: Could not resolve hostname

1、如果系统为64位,无法启动启动hdfs: ./sbin/start-dfs.sh。并有以下错误:

[html]  view plain copy
  1. sed: -e expression #1, char 6: unknown option to `s'  
  2. HotSpot(TM): ssh: Could not resolve hostname HotSpot(TM): Name or service not known  
  3. 64-Bit: ssh: Could not resolve hostname 64-Bit: Name or service not known  
  4. Java: ssh: Could not resolve hostname Java: Name or service not known  
  5. Server: ssh: Could not resolve hostname Server: Name or service not known  
  6. VM: ssh: Could not resolve hostname VM: Name or service not known  
解决方法为:

[java]  view plain copy
  1. vi etc/hadoop/hadoop-env.sh  
加入:

[java]  view plain copy
  1. exportHADOOP_COMMON_LIB_NATIVE_DIR=${HADOOP_PREFIX}/lib/native    

修改:

[java]  view plain copy
  1. export HADOOP_OPTS="-Djava.library.path=$HADOOP_PREFIX/lib" 

你可能感兴趣的:(ssh: Could not resolve hostname)