python 2.7执行命令“ambari server setup”时出现“oserror:[errno 8]exec format error”

brgchamk  于 2021-06-02  发布在  Hadoop
关注(0)|答案(1)|浏览(528)

我已使用中提供的步骤安装了ambari
https://www.linkedin.com/pulse/installing-apache-ambari-20-ec2-centos-65-instance-using-debu-sinha
但是,我无法启动ambari服务器,因为安装程序本身给了我以下命令的错误

ambari服务器设置-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

mrwjdhj3

mrwjdhj31#

问题是ambari服务器安装程序安装的默认jdk库是64位版本,而我的vm是32位。我跳过了oraclejdk的安装部分,选择了选项3,即customejdk,并给出了java\u home路径,正如path变量中提到的那样,我们可以通过执行echo$java\u home来获得它。完成此操作后,它工作得很好。

相关问题