云备份 CBR-安装Cloud-Init常见问题:CentOS 7/Fedora 28操作系统:安装Cloud-Init时提示未安装所需的C编译器

时间:2025-02-12 14:55:51

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/cbr_faq/cbr_06_0030.html