镜像服务 IMS-安装Cloud-Init FAQ:CentOS 7/Fedora 28操作系统:安装Cloud-Init时提示未安装所需的C编译器

时间:2024-07-15 19:44:44

CentOS 7/Fedora 28操作系统:安装Cloud-Init时提示未安装所需的C编译器

  • 问题描述

    Cloud-Init安装完成后,执行以下命令:

    cloud-init init --local

    回显信息出现以下警告:

    /usr/lib/python2.5/site-packages/Cheetah/Compiler.py:1532: UserWarning: 
    You don't have the C version of NameMapper installed! I'm disabling Cheetah's useStackFrames option as it is painfully slow with the Python version of NameMapper. You should get a copy of Cheetah with the compiled C version of NameMapper.
      "\nYou don't have the C version of NameMapper installed!
  • 原因分析

    出现该警告是因为在安装Cloud-Init时,需要编译C版本的NameMapper,但是该系统没有预装gcc,因此无法编译,这才导致C版本的NameMapper缺失。

  • 处理方法

    执行以下命令安装gcc:

    yum -y install gcc

    然后再重新安装Cloud-Init。

support.huaweicloud.com/ims_faq/index.html