如何在 RHEL 7.4 上安装 gcc 4.9.2 [英] how to install gcc 4.9.2 on RHEL 7.4
问题描述
我正在尝试在 Linux 上安装 gcc 和 g++ 4.9.2.我对 Linux 很陌生,我看到了一些关于如何安装的指南,但每次我遇到另一个问题时.我的机器上现在没有任何 gcc.我的 Linux 版本是:红帽企业 Linux 服务器 7.4 版 (Maipo)有人可以帮助我并从头到尾给我指示如何正确执行此操作吗?非常感谢.
I am trying to install gcc and g++ 4.9.2 on Linux. I'm pretty new with Linux and i saw some guides of how to install, but each time I encountered with another problem. I don't have any gcc right now on my machine. my Linux version is: Red Hat Enterprise Linux Server release 7.4 (Maipo) can someone help me and give me instructions from the beginning to the end how to do this properly? thank you very much.
推荐答案
RHEL 带有预配置的 repo,您可以搜索所需的包并使用 yum 包管理器安装它们.
RHEL comes with preconfigured repo, you can search for the desired packages and install them using yum package manager.
为此,首先运行(搜索gcc
)
To do so, first run ( to search gcc
)
$ sudo yum search gcc
这将显示具有匹配名称的可用软件包列表
which will show you a list of available packages with the matching name
============================ Name Exactly Matched: gcc =============================
gcc.x86_64 : Various compilers (C, C++, Objective-C, ...)
gcc.x86_64 : Various compilers (C, C++, Objective-C, ...)
gcc.i686 : Various compilers (C, C++, Objective-C, ...)
=========================== Name & Summary Matched: gcc ============================
gcc-c++.x86_64 : C++ support for GCC
gcc-c++.i686 : C++ support for GCC
gcc-gdb-plugin.x86_64 : GCC plugin for GDB
gcc-gdb-plugin.i686 : GCC plugin for GDB
gcc-gdb-plugin.x86_64 : GCC plugin for GDB
gcc-objc.x86_64 : Objective-C support for GCC
...
通过运行安装你需要的包(安装gcc-c++
)
Install the package you need by running ( to install gcc-c++
)
$ sudo yum install gcc-c++
它将安装软件包并要求确认.
It will the packages to be installed and ask for confirmation.
Dependencies resolved.
====================================================================================
Package Architecture Version Repository Size
====================================================================================
Installing:
gcc-c++ x86_64 8.3.1-2.fc29 updates 12 M
Transaction Summary
====================================================================================
Install 1 Package
Total download size: 12 M
Installed size: 29 M
Is this ok [y/N]:
注意:上述步骤将安装最新版本的软件包.
NOTE: Steps mentioned above will install latest available version of the package.
这篇关于如何在 RHEL 7.4 上安装 gcc 4.9.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!