简体   繁体   中英

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

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.

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

如果您从源 tarball 构建,我相信您应该能够使用./configure --prefix=~/path/to/build/into然后makemake install

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM