" OSError:[Errno 8] Exec格式错误"执行命令" ambari-server setup"

时间:2017-03-12 06:15:21

标签: python-2.7 hadoop data-analysis ambari bigdata

我已按照

中提供的步骤安装了Ambari

https://www.linkedin.com/pulse/installing-apache-ambari-20-ec2-centos-65-instance-using-debu-sinha

但是,我无法启动ambari服务器,因为设置本身会给我下面的命令错误

ambari-server setup -v

File "/usr/lib/python2.6/site-packages/ambari_server/serverSetup.py", line 1013, in setup
  retcode = extract_views()
File "/usr/lib/python2.6/site-packages/ambari_server/serverSetup.py", line 905, in extract_views
  retcode, stdout, stderr = run_os_command(command)
File "/usr/lib/python2.6/site-packages/ambari_commons/os_utils.py", line 98, in run_os_command
  return os_run_os_command(cmd, env, False)
File "/usr/lib/python2.6/site-packages/ambari_commons/os_linux.py", line 45, in os_run_os_command
  shell=shell
File "/usr/lib/python2.6/subprocess.py", line 642, in __init__
  errread, errwrite)
File "/usr/lib/python2.6/subprocess.py", line 1234, in _execute_child
  raise child_exception
OSError: [Errno 8] Exec format error

请帮我解决这个问题,我正在使用带有CentOs 6.5的Oracle VM VirtualBox Error Screen Shot

1 个答案:

答案 0 :(得分:0)

问题是ambari-server setup安装的默认JDK库是64位版本,我的VM是32位。 我跳过了Oracle JDK安装部分,并选择了自定义JDK的选项3,并给出了PATH变量中提到的JAVA_HOME路径,我们可以通过以下方式获取它 echo $ JAVA_HOME 这样做之后,它运作良好。