search
HomeSystem TutorialLINUXDetailed explanation of the steps to upgrade gcc using yum on CentOS6.5

Because we need to use C 11, but the gcc4.4.7 that comes with CentOS does not support it, we decided to upgrade gcc.

The operation is as follows:

#Backup

mv /etc/yum.repos.d/devtools-2.repo /etc/yum.repos.d/devtools-2.repo.bak wget http://people.centos.org/tru/devtools-2 /devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo

yum install devtoolset-2-gcc devtoolset-2-binutils

yum install devtoolset-2-gcc-c

These three files will be downloaded to: /opt/rh/devtoolset-2/root/, and then set the soft link:

#Back up the original 4.4.7 version

mv /usr/bin/gcc /usr/bin/gcc-4.4.7

mv /usr/bin/g /usr/bin/g -4.4.7

mv /usr/bin/c /usr/bin/c -4.4.7

#Set soft link

ln -s /opt/rh/devtoolset-2/root/usr/bin/gcc /usr/bin/gcc

ln -s /opt/rh/devtoolset-2/root/usr/bin/c /usr/bin/c

ln -s /opt/rh/devtoolset-2/root/usr/bin/g /usr/bin/g

gcc -v

The above is the detailed content of Detailed explanation of the steps to upgrade gcc using yum on CentOS6.5. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:脚本之家. If there is any infringement, please contact admin@php.cn delete
详解CentOS6.5使用yum升级gcc的步骤详解CentOS6.5使用yum升级gcc的步骤Dec 31, 2023 am 10:59 AM

因为需要用到C++11,但CentOS自带的gcc4.4.7不支持,所以决定升级gcc。操作如下:#备份mv/etc/yum.repos.d/devtools-2.repo/etc/yum.repos.d/devtools-2.repo.bakwgethttp://people.centos.org/tru/devtools-2/devtools-2.repo-O/etc/yum.repos.d/devtools-2.repoyuminstalldevtoolset-2-gccdevtoolse

centos离线安装中文版GitLabcentos离线安装中文版GitLabFeb 19, 2024 am 11:36 AM

1.下载gitlab安装包从【清华大学开源软件镜像站】下载最新中文版gitlab安装包,安装包里自带了简体中文汉化包。从【gitlab官网】下载gitlab最新安装包。2.安装gitlab以gitlab-ce-14.9.4-ce.0.el7.x86_64为例,将其上传至centos服务器使用yum安装gitlabyum-yinstallgitlab-ce-14.3.2-ce.0.el7.x86_64.rpm使用yum安装gityum-yinstallgit#安装git修改gitlab配置文件vi

Linux包管理工具yum和apt有什么区别Linux包管理工具yum和apt有什么区别May 30, 2023 am 09:53 AM

一般来说著名的Linux系统基本上分两大类:RedHat系列:Redhat、Centos、Fedora等;Debian系列:Debian、Ubuntu等。yum(YellowdogUpdater,Modified)是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器。apt(AdvancedPackagingTool)是一个在Debian和Ubuntu中的Shell前端软件包管理器。概述一般来说著名的Linux系统基本上分两大类:RedHat系列:Redhat、Cento

centos7+yum怎么删除phpcentos7+yum怎么删除phpJan 19, 2023 am 10:00 AM

centos7 yum删除php的方法:1、通过“php-v”查看PHP版本;2、使用“rpm -qa|grep php”查看已经安装的PHP相关扩展;3、通过执行“yum remove php”命令卸载php即可。

linux yum是什么工具linux yum是什么工具Feb 10, 2023 am 10:09 AM

在linux中,yum是一个专门为了解决包的依赖关系而存在的软件包管理器;yum是改进型的RPM软件管理器,它很好的解决了RPM所面临的软件包依赖问题。当管理员使用yum安装RPM包时,yum会先从服务器端下载包的依赖性文件,通过分析此文件从服务器端一次性下载所有相关的RPM包并进行安装。

linux怎么使用yum安装phplinux怎么使用yum安装phpJan 29, 2023 am 09:46 AM

linux使用yum安装php的方法:1、执行“mkdir /usr/local/php”命令;2、下载yum源的更新安装包;3、安装相关yum源安装包;4、通过“yum install”命令安装php即可。

gcc是什么意思gcc是什么意思Jan 29, 2023 pm 03:18 PM

gcc有多种意思:1、GNU编译器套件,是由GNU开发的编程语言编译器,包括C、C++、Objective-C、Fortran、Java、Ada和Go语言前端,也包括这些语言的库。2、海湾地区的政治经济组织,即海湾阿拉伯国家合作委员会,简称海湾合作委员会或海合会,成立于1981年5月,总部设在沙特阿拉伯首都利雅得。3、全球创业周校园中心,是一个汇聚创业爱好者的大学生社团组织。

Linux中yum有何作用?主要功能是什么?Linux中yum有何作用?主要功能是什么?Feb 19, 2024 pm 05:30 PM

大家都或许熟悉Linux系统中的yum,但初学者可能对它并不了解。本文将介绍yum是什么,以及它的功能。请继续阅读。  在Linux中,yum是一个包管理器,用于管理和安装软件包。它是YellowdogUpdater,Modified的缩写,最初是为RedHat系列发行版设计的,但现在也被其他许多基于RPM的Linux发行版所采用。  YUM命令的主要功能包括:YUM是一种软件包管理工具,可用于查找、安装、更新和卸载软件包。通过YUM命令,用户可以方便地管理系统上的软件包,并自动解决软件包之间的

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool