Redhat 的 RHEL8 相当于“apk add --no-cache gcc musl-dev linux-headers" [英] Redhat's RHEL8 equivalent of "apk add --no-cache gcc musl-dev linux-headers"
问题描述
我正在尝试使用来自https://docs.docker.com/compose/gettingstarted"的示例代码,该示例代码安装在 RedHat 企业 linux 7/8 映像上.
I am trying this sample code from "https://docs.docker.com/compose/gettingstarted on Python installed on RedHat enterprise linux 7 / 8 image.
在这一行出现错误 127运行 apk add --no-cache git gcc musl-dev linux-headers
Getting error 127 on this line RUN apk add --no-cache git gcc musl-dev linux-headers
谢谢
推荐答案
在 Red Hat Enterprise Linux 上,安装 gcc
包会同时安装系统 C 编译器和 C 库开发文件,包括所需的UAPI 内核头文件.所以这个命令足以安装一个C开发环境:
On Red Hat Enterprise Linux, installing the gcc
package installs both the system C compiler and the C library development files, including the required UAPI kernel headers. So this command is sufficient to install a C development environment:
yum install gcc
如果你需要 C++ 编译器,你应该使用它:
If you need the C++ compiler, you should use this instead:
yum install gcc-c++
这篇关于Redhat 的 RHEL8 相当于“apk add --no-cache gcc musl-dev linux-headers"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!