Comments on: How To Install GCC on CentOS 7 https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/ Linux Tutorials and Guides Sat, 08 Apr 2023 06:15:59 +0000 hourly 1 https://wordpress.org/?v=6.6.1 By: Amitav Ray https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-779 Sat, 08 Apr 2023 06:15:59 +0000 https://linuxhostsupport.com/blog/?p=502#comment-779 Thanks

]]>
By: Sushii https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-767 Tue, 14 Feb 2023 06:47:44 +0000 https://linuxhostsupport.com/blog/?p=502#comment-767 Hi,

I have followed your guide and successfully installed gcc-9.1.0,
and running which gcc –version returns gcc (GCC) 9.1.0.

However, I now have 2 gcc in my machine and compiling c++ file outputs this error:
./test_output2: /lib64/libstdc++.so.6: version `GLIBCXX_3.4..21′ not found (required by ./test_output2)

I have checked that indeed GLIBCXX_3.4.21 is not found using:
strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX_3.4.21

However, I see that is GLIBCXX_3.4.21 is found using:
strings /usr/local/lib64/libstdc++.so.6 | grep GLIBCXX_3.4.21

Running where gcc returns:
/usr/local/bin/gcc
/usr/bin/gcc

Running which gcc returns:
/usr/local/bin/gcc

I found a solution that using LD_LIBRARY_PATH may resolve this, however Im afraid its not the best practice so I wonder if there is another way to do this like specifying the linker or rpath for gcc and g++

]]>
By: Uanela Pedro Luis Bede Como https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-755 Mon, 02 Jan 2023 15:37:35 +0000 https://linuxhostsupport.com/blog/?p=502#comment-755 In reply to Andrei.

you can find the ip address on your vps, dedicated server, cpanel or other server control panel. and port usually is 22

]]>
By: admin https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-754 Fri, 30 Dec 2022 08:35:20 +0000 https://linuxhostsupport.com/blog/?p=502#comment-754 In reply to Thomas.

You can try running the command “autoreconf -i” before running this command.

]]>
By: Thomas https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-753 Thu, 29 Dec 2022 13:23:59 +0000 https://linuxhostsupport.com/blog/?p=502#comment-753 Hi,I have an error in configuring the downloaded package:
Once the prerequisites are downloaded execute the following command to start configuring the GCC build environment

./configure –disable-multilib –enable-languages=c,c++

result: configure: error: cannot find install-sh, install.sh, or shtool in “.” “./..” “./../..”

Any thoughts?

]]>
By: space https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-752 Sun, 18 Dec 2022 09:42:14 +0000 https://linuxhostsupport.com/blog/?p=502#comment-752 Hi, I want to install ORACLE 19c on centos 7.
While going through installation stages oracle wants gcc 4.8.2 to be installed.
when I type “yum install gcc” as you know it install gcc 4.8.5.
How can i install older versions? Thanks.

]]>
By: admin https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-737 Sat, 15 Oct 2022 15:00:09 +0000 https://linuxhostsupport.com/blog/?p=502#comment-737 In reply to John Mulhere.

Please make sure to remove the old version, then install it from scratch.

]]>
By: John Mulhere https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-733 Fri, 14 Oct 2022 13:54:09 +0000 https://linuxhostsupport.com/blog/?p=502#comment-733 I followed these instructions and installed gcc 12.2.0 on CentOS 7.9. The make and make install steps completed, but when I run gcc –version I still see 4.8.5. The new gcc looks like it installed successfully to /usr/local/lib, but it’s doesn’t look like it actually replaced the older version.

]]>
By: admin https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-682 Tue, 23 Aug 2022 06:34:09 +0000 https://linuxhostsupport.com/blog/?p=502#comment-682 In reply to Ram.

We are not sure what the user is saying but if you want to have the latest version you can download the source manually just refer to step 3 on how to install it manually.

]]>
By: Ram https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-681 Tue, 23 Aug 2022 02:55:16 +0000 https://linuxhostsupport.com/blog/?p=502#comment-681 Hi Admin

I followed the steps but when I check the version I got 4.8.5 instead of newer version.

One of the user mentioned that we need to reload the files before Step-4. could you please provide the instructions on reloading the files ?

Thank you

]]>
By: Aarón López https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-656 Thu, 02 Jun 2022 12:27:33 +0000 https://linuxhostsupport.com/blog/?p=502#comment-656 Hi thanks for this information,
I have updated but when check the version with gcc –version I got 4.8.5 instead of 7.5
I know 7.5 is installed in /usr/local/lib/../lib64
But I am missing something.
Thank you.

]]>
By: admin https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-654 Sat, 28 May 2022 06:23:11 +0000 https://linuxhostsupport.com/blog/?p=502#comment-654 In reply to Aven.

Hi,

Please make sure that the desired version of gcc is downloaded from the link in step 3.

]]>
By: Aven https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-653 Fri, 27 May 2022 07:32:11 +0000 https://linuxhostsupport.com/blog/?p=502#comment-653 Thanks for your sharing.
However, in my case, the gcc –version remains 4.8.5 after installation while g++ has been successfully upgraded to 11.2. Is there a way to change default gcc version?

Thanks,
Aven

]]>
By: Linda https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-641 Sat, 09 Apr 2022 10:58:53 +0000 https://linuxhostsupport.com/blog/?p=502#comment-641 I followed all the steps and get the errors at “make -j 4”:

checking whether canonicalize_file_name must be declared… (cached) no
checking for stdlib.h… (cached) yes
checking for unistd.h… (cached) yes
checking for getpagesize… (cached) yes
checking for working mmap… (cached) yes
checking for working strncmp… (cached) yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating testsuite/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing default commands
make[2]: Leaving directory ‘/usr/local/gcc-7.3.0’
make[1]: *** [Makefile:26035: stage1-bubble] Error 2
make[1]: Leaving directory ‘/usr/local/gcc-7.3.0’
make: *** [Makefile:942: all] Error 2

kindly provide some help? Thanks

]]>
By: admin https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-597 Sat, 12 Feb 2022 07:14:57 +0000 https://linuxhostsupport.com/blog/?p=502#comment-597 In reply to azbvenkat.

Did you run the ‘download_prerequisites’ script as described in the tutorial?

]]>
By: azbvenkat https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-596 Fri, 11 Feb 2022 11:18:34 +0000 https://linuxhostsupport.com/blog/?p=502#comment-596 in the make-step getting the following error? (gcc 8.5.0)

In file included from ../../.././libstdc++-v3/libsupc++/unwind-cxx.h:41,
from ../../.././libstdc++-v3/libsupc++/eh_catch.cc:26:
../../.././libstdc++-v3/libsupc++/eh_catch.cc: In function ‘void* __cxxabiv1::__cxa_begin_catch(void*)’:
../../.././libstdc++-v3/libsupc++/unwind-cxx.h:45:34: error: unable to find string literal operator ‘operator””_SDT_S’ with ‘const char [37]’, ‘long unsigned int’ arguments
#define PROBE2(name, arg1, arg2) STAP_PROBE2 (libstdcxx, name, arg1, arg2)
^~~~~~~~~~~
../../.././libstdc++-v3/libsupc++/eh_catch.cc:84:3: note: in expansion of macro ‘PROBE2’
PROBE2 (catch, objectp, header->exceptionType);
^~~~~~
../../.././libstdc++-v3/libsupc++/unwind-cxx.h:45:34: error: unable to find string literal operator ‘operator””_SDT_S’ with ‘const char [51]’, ‘long unsigned int’ arguments
#define PROBE2(name, arg1, arg2) STAP_PROBE2 (libstdcxx, name, arg1, arg2)
^~~~~~~~~~~
../../.././libstdc++-v3/libsupc++/eh_catch.cc:84:3: note: in expansion of macro ‘PROBE2’
PROBE2 (catch, objectp, header->exceptionType);
^~~~~~
make[5]: *** [eh_catch.lo] Error 1
make[5]: Leaving directory `/scratch/software/gcc-8.5.0/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++’
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/scratch/software/gcc-8.5.0/x86_64-pc-linux-gnu/libstdc++-v3′
make[3]: *** [all] Error 2
make[3]: Leaving directory `/scratch/software/gcc-8.5.0/x86_64-pc-linux-gnu/libstdc++-v3′
make[2]: *** [all-stage1-target-libstdc++-v3] Error 2

kindly provide a possible solution to fix this issue. thank you

]]>
By: Jeongmin https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-576 Thu, 16 Dec 2021 08:54:12 +0000 https://linuxhostsupport.com/blog/?p=502#comment-576 Thank you sir..!
I spent 3 hours trying to figure out how to install it, but thanks to you, I solved it.

]]>
By: admin https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-530 Fri, 23 Jul 2021 06:12:45 +0000 https://linuxhostsupport.com/blog/?p=502#comment-530 In reply to Taofeek.

You need to install the GNU C++ compiler. For Centos “yum install gcc-c++”.

]]>
By: Taofeek https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-529 Thu, 22 Jul 2021 19:01:33 +0000 https://linuxhostsupport.com/blog/?p=502#comment-529 Im new to linux. I installed the gcc compiler to compile openmpi on google cloud and it seemed to install fine since I checked using gcc –version. But when I tried to compile openmpi using ./configure –prefix=”/home/bogunbayo/openmpi411/” it gave the following error messages

*** C++ compiler and preprocessor
checking for g++… no
checking for c++… no
checking for gpp… no
checking for aCC… no
checking for CC… no
checking for cxx… no
checking for cc++… no
checking for cl.exe… no
checking for FCC… no
checking for KCC… no
checking for RCC… no
checking for xlC_r… no
checking for xlC… no
checking whether we are using the GNU C++ compiler… no
checking whether g++ accepts -g… no
checking dependency style of g++… none
checking how to run the C++ preprocessor… /lib/cpp
configure: error: in `/home/bogunbayo/openmpi-4.1.1′:
configure: error: C++ preprocessor “/lib/cpp” fails sanity check
See `config.log’ for more details

What did I do wrong? What do I need to do to fix this? Thank you

]]>
By: Murat https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-457 Mon, 29 Mar 2021 16:37:11 +0000 https://linuxhostsupport.com/blog/?p=502#comment-457 Hi, I am using gcc-8.3.1 on Centos7 cluster. I am having same kind of errors when I am trying to install some certain R packages. Here is the process that I am following:

module load R/4.0.3

module unload gcc

module load gcc/8.3.1

R

After launching R, trying to install packages and having same errors (see for Rcpp package):
g++-8.3.1 -I”/share/builds/spack/opt/spack/linux-centos7-sandybridge/gcc-8.3.0/r-4.0.3-zkmqmoo7jq7xgup5bt6azwkcph6jxqcm/rlib/R/include” -DNDEBUG -I../inst/include/ -I/usr/local/include -std=c++11 -fpic -g -O2 -c api.cpp -o api.o
/bin/sh: g++-8.3.1: command not found

make: *** [/share/builds/spack/opt/spack/linux-centos7-sandybridge/gcc-8.3.0/r-4.0.3-zkmqmoo7jq7xgup5bt6azwkcph6jxqcm/rlib/R/etc/Makeconf:181: api.o] Error 127
ERROR: compilation failed for package ‘Rcpp’
* removing ‘/nethome/mxk841/R/x86_64-pc-linux-gnu-library/4.0/Rcpp’
* restoring previous ‘/nethome/mxk841/R/x86_64-pc-linux-gnu-library/4.0/Rcpp’

Warning message:
In install.packages(“Rcpp”, type = “source”) :
installation of package ‘Rcpp’ had non-zero exit status

Any tips for this kind of errors. Thanks in advance!

]]>
By: MJ https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-453 Sat, 20 Mar 2021 05:39:03 +0000 https://linuxhostsupport.com/blog/?p=502#comment-453 Thanks so much. This was a huge help!

]]>
By: Filippo Pavan https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-445 Fri, 12 Mar 2021 13:49:46 +0000 https://linuxhostsupport.com/blog/?p=502#comment-445 Thanks for the detailed information. I really like the kindness you show when answering in the “comments” section.

]]>
By: admin https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-442 Sat, 06 Mar 2021 07:16:08 +0000 https://linuxhostsupport.com/blog/?p=502#comment-442 In reply to Robert Jr.

You can try to delete gcc with:
yum remove –skip-broken gcc

]]>
By: Robert Jr https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-441 Fri, 05 Mar 2021 08:44:55 +0000 https://linuxhostsupport.com/blog/?p=502#comment-441 Thanks for this valuable information,
also Please can you tell, how to uninstall gcc that is being installed by the way you specified.

Thanks in advance

]]>
By: admin https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-435 Tue, 23 Feb 2021 07:53:44 +0000 https://linuxhostsupport.com/blog/?p=502#comment-435 In reply to Sanjay.

It is highly recommended to start a screen session because the installation would take a while to accomplish and losing your connection or any interruption might break the installation and you have to start again.

]]>
By: admin https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-434 Tue, 23 Feb 2021 07:53:06 +0000 https://linuxhostsupport.com/blog/?p=502#comment-434 In reply to Sanjay.

This depends on a number of factors like you disk i/o, cpu, memory, etc.

]]>
By: Sanjay https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-432 Mon, 22 Feb 2021 10:46:33 +0000 https://linuxhostsupport.com/blog/?p=502#comment-432 also I dont have Screen installed on my machine , doesnt it work without screen session?
about step : screen -U -S gcc

]]>
By: Sanjay https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-431 Mon, 22 Feb 2021 10:44:30 +0000 https://linuxhostsupport.com/blog/?p=502#comment-431 How much time does “make -j 4” command takes usually?

]]>
By: admin https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-419 Fri, 22 Jan 2021 07:32:54 +0000 https://linuxhostsupport.com/blog/?p=502#comment-419 In reply to T.

Please check GCC official website, there should be an offline install available

]]>
By: T https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-418 Thu, 21 Jan 2021 21:25:33 +0000 https://linuxhostsupport.com/blog/?p=502#comment-418 Is there somewhere I can predownload the download prerequisites for offline install?

]]>
By: admin https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-415 Thu, 14 Jan 2021 08:37:14 +0000 https://linuxhostsupport.com/blog/?p=502#comment-415 In reply to TOD.

Please check /usr/local as that is the default location of the installation. Please make sure you have downloaded the prerequisites and configured the GCC build environment as stated on the procedure.

]]>
By: TOD https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-414 Wed, 13 Jan 2021 11:49:51 +0000 https://linuxhostsupport.com/blog/?p=502#comment-414 I followed all the steps to install of section “3. Install GCC from source”.
I hade no error. But when I do gcc –version I stiil got the native version 4.8.5 (centos 7).
Where is installed the 7.3 version?

]]>
By: admin https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-413 Mon, 11 Jan 2021 07:22:46 +0000 https://linuxhostsupport.com/blog/?p=502#comment-413 In reply to Chao-Tsung Hsiao.

Can you please provide us with the whole error message?

]]>
By: Chao-Tsung Hsiao https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-411 Wed, 06 Jan 2021 16:01:52 +0000 https://linuxhostsupport.com/blog/?p=502#comment-411 I followed the instruction to install gcc-8.2.0 on CentOS 7, but it cannot complete for
make -j 4

It ended up with error messages after
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating src/Makefile
config.status: creating tests/Makefile
config.status: creating tune/Makefile
config.status: creating src/mparam.h
config.status: executing depfiles commands
config.status: executing libtool commands

make[2]: Leaving directory `/aspendata/install/gcc-8.2.0′
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/aspendata/install/gcc-8.2.0′
make: *** [all] Error 2

]]>
By: admin https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-405 Thu, 10 Dec 2020 07:42:15 +0000 https://linuxhostsupport.com/blog/?p=502#comment-405 In reply to Nilang.

The error is being thrown because your server lacks disk space. Please check your server disk space.

]]>
By: Nilang https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-404 Wed, 09 Dec 2020 19:28:37 +0000 https://linuxhostsupport.com/blog/?p=502#comment-404 /root/gcc-7.3.0/x86_64-pc-linux-gnu/libstdc++-v3/include/tr1/utility:106:1: fatal error: can’t write PCH file: No space left on device
}
^
compilation terminated.
make[5]: *** [x86_64-pc-linux-gnu/bits/stdtr1c++.h.gch/O2g.gch] Error 1
make[5]: Leaving directory `/root/gcc-7.3.0/x86_64-pc-linux-gnu/libstdc++-v3/include’
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/root/gcc-7.3.0/x86_64-pc-linux-gnu/libstdc++-v3′
make[3]: *** [all] Error 2
make[3]: Leaving directory `/root/gcc-7.3.0/x86_64-pc-linux-gnu/libstdc++-v3′
make[2]: *** [all-stage2-target-libstdc++-v3] Error 2
make[2]: Leaving directory `/root/gcc-7.3.0′
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory `/root/gcc-7.3.0′
make: *** [all] Error 2

]]>
By: Nilang https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-403 Wed, 09 Dec 2020 18:59:57 +0000 https://linuxhostsupport.com/blog/?p=502#comment-403 In reply to admin.

Yes I did the same but same error

]]>
By: Akash https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-230 Mon, 12 Aug 2019 06:25:24 +0000 https://linuxhostsupport.com/blog/?p=502#comment-230 In reply to Rahul.

What do you mean by reload files from path again? I followed the steps but I still see the old version on using the gcc –version command. Maybe this is the step that I am required to do.

]]>
By: yaodav https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-216 Mon, 08 Jul 2019 06:20:08 +0000 https://linuxhostsupport.com/blog/?p=502#comment-216 i installed the gcc and g++ according to the guide but when i do g++ –version it give me :
yaodav@localhost ~]$ g++ –version
g++ (GCC) 7.4.0
but when i give the command as sudo i get :
yaodavdav@localhost ~]$ sudo g++ –version
g++ (GCC) 4.8.5 20150625 (Red Hat 4.8.5-36)
how to enable the new gcc also to the sudo?

the right version but when i give the command with sudo i get the old version

]]>
By: admin https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-206 Wed, 29 May 2019 06:20:57 +0000 https://linuxhostsupport.com/blog/?p=502#comment-206 In reply to karthikeyan.

Please try to run the commands as user root.

]]>
By: karthikeyan https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-205 Tue, 28 May 2019 11:38:18 +0000 https://linuxhostsupport.com/blog/?p=502#comment-205 I followed your steps step by step but on the step
make install


echo GTFILES_LANG_H=gtype-ada.h gtype-c.h gtype-cp.h gtype-fortran.h gtype-go.h gtype-java.h gtype-jit.h gtype-lto.h gtype-objc.h gtype-objcp.h >> tmp-header-vars; \
/bin/sh ../.././gcc/../move-if-change tmp-header-vars b-header-vars
/bin/sh: tmp-header-vars: Permission denied

/bin/sh: tmp-header-vars: Permission denied
mv: cannot stat ‘tmp-header-vars’: No such file or directory
make[2]: *** [s-header-vars] Error 1

not sure how to proceed

]]>
By: Berg https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-204 Thu, 23 May 2019 15:04:47 +0000 https://linuxhostsupport.com/blog/?p=502#comment-204 In reply to admin.

Not true, you can build it locally without having root or sudo access just fine.
You can use:

./configure –prefix=/home/user/your/repo
make PREFIX=/home/user/your/repo install

]]>
By: JamesS https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-200 Fri, 17 May 2019 16:13:32 +0000 https://linuxhostsupport.com/blog/?p=502#comment-200 In reply to Rahul.

This got me. Thanks for comment

]]>
By: Rahul https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-199 Mon, 13 May 2019 13:51:17 +0000 https://linuxhostsupport.com/blog/?p=502#comment-199 Just an extremely minor thing. Before point 4, you might consider advising the user to reload files from the path again. Otherwise older version of gcc appears on invocation at that step.

]]>
By: admin https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-193 Thu, 09 May 2019 06:42:42 +0000 https://linuxhostsupport.com/blog/?p=502#comment-193 In reply to Anastasiia.

You can install any version. However, you need to have root or sudo access to your server.

]]>
By: Anastasiia https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-192 Wed, 08 May 2019 08:15:23 +0000 https://linuxhostsupport.com/blog/?p=502#comment-192 Hello! Is it possible to somehow install the version above 4.8.5 without being a superuser?

]]>
By: dimarco https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-152 Mon, 21 Jan 2019 20:29:53 +0000 https://linuxhostsupport.com/blog/?p=502#comment-152 I need a newer libm.so.6 … but after compilation those are not created …. do I have to use another make command to do that?

]]>
By: admin https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-150 Mon, 24 Dec 2018 11:54:34 +0000 https://linuxhostsupport.com/blog/?p=502#comment-150 In reply to MikeT.

The latest gcc and g++ version distributed by CentOS 7 is 4.8.5. If you would like to install a different version you would have to install it from source.

]]>
By: MikeT https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-148 Sat, 22 Dec 2018 18:20:21 +0000 https://linuxhostsupport.com/blog/?p=502#comment-148 I followed your steps, and things seemed to go as expected, except there is a discrepancy between the version reported by gcc –version, which is 5.5.0 (the release I need for my client) and g++ -v, which reports 4.8.5. How do I make it so g++ links to the same compiler installation?

]]>
By: admin https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-141 Tue, 11 Dec 2018 07:53:21 +0000 https://linuxhostsupport.com/blog/?p=502#comment-141 In reply to Shan.

There is a gcc minimum version required to build a specific kernel version.

]]>
By: Shan https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-140 Mon, 10 Dec 2018 17:55:43 +0000 https://linuxhostsupport.com/blog/?p=502#comment-140 Hi, I am wondering if the Gcc version needs to match with some specific kernel version? Or those two are independent? Thanks.

]]>
By: admin https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-133 Tue, 04 Dec 2018 16:14:02 +0000 https://linuxhostsupport.com/blog/?p=502#comment-133 In reply to Nathan.

Did you run the ‘download_prerequisites’ script as described in the tutorial?

]]>
By: Nathan https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-132 Tue, 04 Dec 2018 15:48:08 +0000 https://linuxhostsupport.com/blog/?p=502#comment-132 I followed your steps step by step but at the end there was an error.
make install
make[1]: Entering directory `/root/gcc-7.3.0′
/bin/sh ./mkinstalldirs /usr/local /usr/local
make[2]: Entering directory `/root/gcc-7.3.0/host-x86_64-pc-linux-gnu/fixincludes’
make[2]: *** No rule to make target `install’. Stop.
make[2]: Leaving directory `/root/gcc-7.3.0/host-x86_64-pc-linux-gnu/fixincludes’
make[1]: *** [install-fixincludes] Error 2
make[1]: Leaving directory `/root/gcc-7.3.0′
make: *** [install] Error 2

]]>
By: admin https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-126 Wed, 31 Oct 2018 10:21:39 +0000 https://linuxhostsupport.com/blog/?p=502#comment-126 This is because processes running in a screen session will continue to run even if the window is closed or you get disconnected.

]]>
By: sushi https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-125 Wed, 31 Oct 2018 04:52:54 +0000 https://linuxhostsupport.com/blog/?p=502#comment-125 Hi, I’m not used to Linux much, but can you tell me why “It is highly recommended to start a screen session before starting the installation.” on Section 3? Thank you.

]]>
By: admin https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-78 Sat, 21 Jul 2018 14:49:01 +0000 https://linuxhostsupport.com/blog/?p=502#comment-78 In reply to Ignacio.

You can install GNU Fortran using yum, RPM package or build it from source. Please check the official documentation for installation instructions.

]]>
By: Ignacio https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-77 Sat, 21 Jul 2018 01:12:45 +0000 https://linuxhostsupport.com/blog/?p=502#comment-77 On centos 7 I have installed ccg 7.3.0:
#gcc –version
gcc (GCC) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.

however, gfortran version is 4
# gfortran –version
GNU Fortran (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)

I really need gfortran 6 o newer for some application

please help me, I had tried many things and they didn’t work.

]]>
By: admin https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-76 Fri, 13 Jul 2018 09:36:44 +0000 https://linuxhostsupport.com/blog/?p=502#comment-76 In reply to Andrei.

This command is used to establish an SSH connection to a remote server. If you are doing this installation on your local computer, you can skip this part.

The IP address is a unique numerical number assigned to every device connected to the Internet. The Port_number in this command refers to the port number of the SSH service which is running on your server. Usually, the default SSH port is set to 22.

If you are not sure about the IP address and the SSH port number of your server you should contact your hosting provider and ask them for this information.

]]>
By: Andrei https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/#comment-75 Wed, 11 Jul 2018 21:18:28 +0000 https://linuxhostsupport.com/blog/?p=502#comment-75 Hi,
I’m new to linux and i’m trying to understand it better, can you please detail this line: “ssh root@IP_Address -p Port_number

What is IP_address, where do i find it, and what is Port_number and where do i find it, if you could provide an answer it would be awesome.

Thanks in advance!

]]>