In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you the "installation of linux redhat can not use the yum command to install gcc-c++ after the installation of gcc-c++ how to do", the content is easy to understand, clear, hope to help you solve your doubts, the following let Xiaobian lead you to study and learn "after installing linux redhat can not use the yum command to install gcc-c++ how to do" this article.
When I first entered the workplace and installed the environment for linux redhat, I encountered this problem.
[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, 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
At this point, the gcc installation is complete, and yum installation is available for other compilation environments.
The above is all the contents of this article "what to do if you cannot use the yum command to install gcc-c++ after installing linux redhat". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.