Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to install g++ on CentOS without root?

I've got a core i7 machine wtih CentOS 5.8 that I SSH into and use for running simulations. Unfortunately it only has gcc version 4.1.2. This seems to be producing vastly slower programs than what I get when compiling with optimizations on my slower laptop machine with Microsoft Visual Express c++ 2010. I've tried various g++ optimization flags but they aren't much help so I'm thinking i need to upgrade gcc.

I don't have root on the machine so it looks like I'd have to install it in my home directory. Is this feasible and if so are there any specific instructions needed to do this?

Thanks

like image 638
user67081 Avatar asked Nov 21 '12 19:11

user67081


People also ask

Does CentOS come with GCC?

The default CentOS repositories contain a package group named Development Tools that contains the GCC compiler and a lot of libraries and other utilities required for compiling software.


Video Answer


2 Answers

You could use EasyBuild, which will allow you to very easily install a particular GCC version without requiring root, see http://hpcugent.github.com/easybuild .

Disclaimer: I'm an EasyBuild developer.

like image 67
Kenneth Hoste Avatar answered Sep 30 '22 22:09

Kenneth Hoste


You can also use GNU SRC..

After configuration, go to the gsrc directory and specify the following commands:

make -C gnu/gcc 
make -C gnu/gcc install
like image 26
DanielY Avatar answered Sep 30 '22 22:09

DanielY