LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Installing C++ on a CentOS running Linux (https://www.linuxquestions.org/questions/linux-newbie-8/installing-c-on-a-centos-running-linux-4175490074/)

arcolombo698 01-03-2014 11:13 PM

Installing C++ on a CentOS running Linux
 
Hello.

I need to install C++ on a CentOS system that is running linux. or I need to check if it has c++ installed... advice?

btmiller 01-03-2014 11:29 PM

Install the g++ compiler. If you do:

Code:

yum groupinstall "development tools"
That should give you gcc, g++, and the basic include files and libraries you need to compile code.

arcolombo698 01-03-2014 11:30 PM

C++
 
will this also give me c++? or just compiling tools?

I am also install on a HPCC server... does this matter?

arcolombo698 01-03-2014 11:31 PM

Errs
 
[acolombo@hpc-login2 ~]$ yum groupinstall "development tools"
Loaded plugins: fastestmirror, priorities, refresh-packagekit, security
You need to be root to perform this command.

knudfl 01-04-2014 07:02 AM

Installing the c++ compiler :

1) $ su <enter-root-password>
2) # yum install gcc-c++

If you also want all the other "Development tools" :
a) $ yum grouplist
.. to check how to spell "Development tools".
I.e. it is not "development tools".
b) # yum groupinstall "Development tools"

-

suicidaleggroll 01-04-2014 09:56 AM

Quote:

Originally Posted by arcolombo698 (Post 5091641)
will this also give me c++? or just compiling tools?

c++ is a language, it's not something that can be "installed" (that's like asking how to install html), so you need to clarify your question. The above posts are telling you how to install a c++ compiler so that you can build c++ code, since that's the closest logical interpretation of what you're asking.

---------- Post added 01-04-14 at 08:56 AM ----------

Quote:

Originally Posted by arcolombo698 (Post 5091644)
[acolombo@hpc-login2 ~]$ yum groupinstall "development tools"
Loaded plugins: fastestmirror, priorities, refresh-packagekit, security
You need to be root to perform this command.

So become root.

Code:

su -
and type in root's password

btmiller 01-04-2014 12:24 PM

Quote:

Originally Posted by knudfl (Post 5091771)
Installing the c++ compiler :

1) $ su <enter-root-password>
2) # yum install gcc-c++

If you also want all the other "Development tools" :
a) $ yum grouplist
.. to check how to spell "Development tools".
I.e. it is not "development tools".
b) # yum groupinstall "Development tools"

-

Thanks for the spelling correction (I didn't have a Red Hat based box handy to check on). It's really obnoxious how Red Hat and friends use capitalization in the package group names.


All times are GMT -5. The time now is 05:13 PM.