安装impala时出错

sigwle7e  于 2021-06-26  发布在  Impala
关注(0)|答案(1)|浏览(430)

我正试图按照本网站的说明安装 Impala :https://cwiki.apache.org/confluence/display/impala/building+impala
但是这个错误出来了,我不能继续了,有人能帮我吗?
obs:有人知道是否可以从ambari或hue安装吗?
先谢谢你

Installing Cookbook Gems:
Compiling Cookbooks...

================================================================================
Recipe Compile Error in /root/impala-setup/cookbooks/python/attributes/default.rb
================================================================================

NoMethodError
-------------
undefined method `platform' for #<Chef::Node::Attribute:0x00000004b13420>

Cookbook Trace:
---------------
  /root/impala-setup/cookbooks/python/attributes/default.rb:24:in `from_file'

Relevant File Content:
----------------------
/root/impala-setup/cookbooks/python/attributes/default.rb:

 17:  # See the License for the specific language governing permissions and
 18:  # limitations under the License.
 19:  #
 20:  
 21:  default['python']['install_method'] = 'package'
 22:  
 23:  if default['python']['install_method'] == 'package'
 24>>   case platform
 25:    when "smartos"
 26:      default['python']['prefix_dir']         = '/opt/local'
 27:    else
 28:      default['python']['prefix_dir']         = '/usr'
 29:    end
 30:  else
 31:    default['python']['prefix_dir']         = '/usr/local'
 32:  end
 33:  

System Info:
------------
chef_version=13.0.118
platform=ubuntu
platform_version=14.04
ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
program_name=chef-solo worker: ppid=7000;start=12:50:46;
executable=/opt/chef/bin/chef-solo

Running handlers:
[2017-04-18T12:50:48+02:00] ERROR: Running exception handlers
[2017-04-18T12:50:48+02:00] ERROR: Running exception handlers
Running handlers complete
[2017-04-18T12:50:48+02:00] ERROR: Exception handlers complete
[2017-04-18T12:50:48+02:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 02 seconds
[2017-04-18T12:50:48+02:00] FATAL: Stacktrace dumped to /root/impala-setup/chef-stacktrace.out
[2017-04-18T12:50:48+02:00] FATAL: Stacktrace dumped to /root/impala-setup/chef-stacktrace.out
[2017-04-18T12:50:48+02:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-04-18T12:50:48+02:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-04-18T12:50:48+02:00] ERROR: undefined method `platform' for #<Chef::Node::Attribute:0x00000004b13420>
[2017-04-18T12:50:48+02:00] ERROR: undefined method `platform' for #<Chef::Node::Attribute:0x00000004b13420>
[2017-04-18T12:50:48+02:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
[2017-04-18T12:50:48+02:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
6fe3ivhb

6fe3ivhb1#

该错误是错误访问节点属性的结果。
逻辑 case platform 使用不正确。例如,属性文件中的上述属性是wrong:-

if python['install_method'] == 'package'
  case platform
   when "smartos"
    default['python']['prefix_dir']         = '/opt/local'
   else
    default['python']['prefix_dir']         = '/usr'
  end
else
  default['python']['prefix_dir']         = '/usr/local'
end

而且,应该如下所示 platform 是节点属性:-

if python['install_method'] == 'package'
  case node['platform']
   when "smartos"
    default['python']['prefix_dir']         = '/opt/local'
   else
    default['python']['prefix_dir']         = '/usr'
  end
else
  default['python']['prefix_dir']         = '/usr/local'
end

相关问题