Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

After installing linux redhat, you can't use the yum command to install gcc-c++.

2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces the "installation of linux redhat can not use the yum command to install gcc-c++ after the installation of gcc-c++" related knowledge, editor through the actual case to show you the process of operation, the method of operation is simple and fast, practical, hope that this "installation of linux redhat can not use the yum command to install gcc-c++ how to solve" article can help you solve the problem.

Question:

[root@localhost] # yum-y install gccloaded plugins: katello, product-id, security, subscription-managerupdating certificate-based repositories.unable to read consumer identitysetting up install processno package gcc available.nothing to do

For people who are used to using centos, it is torture not to use this command.

Resolution process:

1. Install a centos image for linux redhat

[root@localhost~] # wget http://mirrors.163.com/.help/centos6-base-163.repo--2015-10-09 14root@localhost~ 3310muri-http://mirrors.163.com/.help/centos6-base-163.reporesolving mirrors.163.com... 123.58.173.186123.58.173.185connecting to mirrors.163.com | 123.58.173.186 |: 80...connected.http request sent, awaiting response... 200 oklength: 2341 (2.3k) [application/octet-stream] saving to: `centos6-base-163.repo'100%2341 -.-- k in 0s 2015-10-09 14:33:22 (108mb/s)-`centos6-base-163.repo' saved [2341Comp2341]

two。 Modify the repo file

[root@localhost~] # mv centos6-base-163.repo / etc/yum.repos.d/*** replace $releasever with 6 [root@localhost yum.repos.d] # sed-I's releasing releases. / centos6-base-163.repo

3. Clear all caches

[root@localhost yum.repos.d] # yum clean allloaded plugins: katello, product-id, security, subscription-managerupdating certificate-based repositories.unable to read consumer identitycleaning up everything

4. Get yum list

[root@localhost yum.repos.d] # yum makecacheloaded plugins: katello, product-id, security Subscription-managerupdating certificate-based repositories.unable to read consumer identityaddons | 1.9kb 00:00 addons/filelists_db | 570b 00:00 .base 3667/3667base 3667/3667base 3667/3667metadata cache created

5. Search for installation

[root@localhost ~] # yum search gcc | grep-- color'^ gcc'gcc.x86_64: various compilers (c, clockwise, objective-c, java) ) gcc-c++.x86_64: C++ support for gccgcc-gfortran.x86_64: fortran 95 supportgcc-gnat.x86_64: ada 95 support for gccgcc-java.x86_64: java support for gccgcc-objc++.x86_64: objective-c++ support for gccgcc-objc.x86_64: objective-c support for gccgcc44.x86_64: gnu compiler collection version 4.4gcc44-c++.x86_64: C++ support for gcc version 4.4gcc44-gfortran.x86_64: fortran support for gcc 4.4

6. Install gcc

[root@localhost yum.repos.d] # yum-y install gcc on "after installing linux redhat cannot use the yum command to install gcc-c++ how to solve", thank you for reading here. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report