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

How to resolve an error when installing gcc in CentOS

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

How to solve CentOS installation gcc when a mistake, many novices are not very clear, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.

I don't know that everyone has been like me, always prompting errors when updating CentOS and installing gcc. Later, I finally found a good way to solve it. Next, let's analyze and solve the problem of installing gcc in CentOS.

The cause is the installation of gcc on a trixbox

* step: update the software package of the system to *

Yum-y update

After a long wait, reboot, and then run again

Yum-y update confirms that there are no more modules to update.

Next, CentOS installs GCC

Yum-y install gcc

I didn't expect to make a mistake. It seems to be lack of kernel-headers.

So, I try "yum install kernel-headers": [trixbox1.localdomain src] # yum install kernel-headers Loading "installonlyn" plugin Setting up Install Process Setting up repositories Reading repository metadata in from local files Excluding Packages from CentOS-5-Base Finished Excluding Packages from CentOS-5-Updates Finished Excluding Packages from CentOS-5-Addons Finished Excluding Packages from CentOS-5-Extras Finished Parsing package install arguments Nothing to do [trixbox1.localdomain src] #

Later, I saw someone say that the default CentOS-Base.repo does not include downloading kernel.

Comment out the exclude=kernel* in it

Run yum-y update again. Start downloading a kernel package again. This is the reason for the failure.

Execute yum install gcc again

In this way, everything is fine, and we have solved the problem of an error in updating the CentOS installation gcc.

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

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

Servers

Wechat

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

12
Report