Assuming you want to upgrade the GCC (GNU Compiler Collection) on CentOS 7 to version 4.9.4, here are the steps:
Enable the Software Collections (SCL) repository:
sudo yum install centos-release-scl
Install the devtoolset-3 package, which includes GCC 4.9:
sudo yum install devtoolset-3
Enable the devtoolset-3 environment by running:
scl enable devtoolset-3 bash
This will set up the environment variables necessary to use GCC 4.9.
Verify that GCC 4.9 is being used:
gcc --version
You should see output similar to:
gcc (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6)
Note that the version number may be slightly different depending on updates.
If you want to make this version of GCC available system-wide without having to enable the devtoolset-3 environment each time, you can create a script to set up the environment variables and add it to your system's shell initialization script. For example, you could create a file called scl_enable.sh
with the following contents:
#!/bin/bash
source scl_source enable devtoolset-3
Then add this line to your .bashrc
file:
source /path/to/scl_enable.sh
Replace /path/to
with the actual path to the scl_enable.sh
file. This will automatically enable the devtoolset-3 environment every time you open a new shell session.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2022-10-15 11:00:00 +0000
Seen: 10 times
Last updated: Sep 16 '21
How can you obtain the sha1 of the most recent commit in a git repository using C#?
How can I deal with Expression.Error related to a column in Power Query?
How can you implement pagination in Oracle for the LISTAGG() function?
What is the process for implementing a FutureBuilder on an OnTap function in Flutter?
How can we require users to be logged in before they can access the root folders in WordPress?
In SCSS, what is the method for grouping and reusing a set of classes and styles?
How can popen() be used to direct streaming data to TAR?
How does iOS retrieve information from a BLE device?
How can Django Admin accommodate a variety of formats and locales for its input fields?