Detailed 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!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Choosing a C Compiler: Five Most Popular Recommendations, Specific Code Examples Needed Introduction: C is a high-level programming language widely used in system development and embedded device programming. Whether you are a beginner or an experienced programmer, choosing the right C compiler is crucial. This article will introduce the five most popular C language compilers and provide specific code examples to help readers choose the compiler that suits their needs. 1. GCC compiler: GCC (GNUCompilerCollection

Debian is a popular Linux distribution, widely used in servers and desktop systems. GCC (GNUCompilerCollection) is an open source compiler suite used to compile C, C++, Fortran and other programming languages. In the Debian system, Installing GCC and GCC10 is very simple. This article will provide you with a detailed installation guide. Install GCC1. Open Terminal and use the following command to update the package list: ```shellsudoaptupdate``` 2. Install GCC and its related tools: sudoaptinstallbuild-essential This command will install

Because C++11 needs to be used, but the gcc4.4.7 that comes with CentOS does not support it, I 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.bakwgethttp://people.centos.org/tru/devtools-2 /devtools-2.repo-O/etc/yum.repos.d/devtools-2.repoyuminstalldevtoolset-2-gccdevtoolse

1. Download the gitlab installation package. Download the latest Chinese version of the gitlab installation package from [Tsinghua University Open Source Software Mirror Station]. The installation package comes with a simplified Chinese localization package. Download the latest gitlab installation package from [gitlab official website]. 2. Install gitlab, take gitlab-ce-14.9.4-ce.0.el7.x86_64 as an example, upload it to the centos server and use yum to install gitlabyum-yinstallgitlab-ce-14.3.2-ce.0.el7.x86_64. rpm uses yum to install gityum-yinstallgit#Install git and modify the gitlab configuration file vi

Regarding the default version number of GCC installed through yum under CentOS, CentOS5 is 4.1.2; CentOS6 is 4.4.7; CentOS7 is 4.8.3. Many times, a higher version of GCC is required when compiling and installing software, otherwise an error will be reported. So how to upgrade the GCC version? First, confirm the GCC version number you upgraded to. At present, the latest version of GCC has reached 5.2, and CentOS7 still uses its 4.8, so based on compatibility considerations, I chose to upgrade to 4.8.5. GCC official website: https://gcc.gnu.org Let’s start step by step to compile and install GCC4.8.5. It should be noted that before compiling and installing GCC, the system

Generally speaking, famous Linux systems are basically divided into two categories: RedHat series: Redhat, Centos, Fedora, etc.; Debian series: Debian, Ubuntu, etc. yum (YellowdogUpdater, Modified) is a Shell front-end package manager in Fedora, RedHat and SUSE. apt (AdvancedPackagingTool) is a shell front-end package manager in Debian and Ubuntu. Overview Generally speaking, the famous Linux systems are basically divided into two categories: RedHat series: Redhat, Cento

How to delete php in centos7 yum: 1. Check the PHP version through "php -v"; 2. Use "rpm -qa|grep php" to check the installed PHP related extensions; 3. Uninstall php by executing the "yum remove php" command That’s it.

How to install php using yum on Linux: 1. Execute the "mkdir /usr/local/php" command; 2. Download the updated installation package of the yum source; 3. Install the relevant yum source installation package; 4. Install through the "yum install" command php is enough.
