RHEL install C++ compiler

Today, I want to compile and install mongoDB through the source code, but when compiling, it prompts that there is no C++ compiler.

no c++ compiler g++ does not work

 There is no way, I am not familiar with Linux, so I have to search online, only to find the following method that feels reliable:

http://www.cyberciti.biz/faq/howto-install-c-cpp-compiler-on-rhel/

 

I tried the third of them (both the first and the second failed), i.e.

yum install gcc gcc-c++ autoconf automake

But after entering the above command, it says that no source is available.

Okay, so I built a local yum source myself, you can refer to:

http://rainbow702.iteye.com/blog/2259865

This will compile

# scons needs to be installed separately, please refer to the official instructions of MongoDB for details
scons all -j 2

However, unfortunately, the mongoDB compilation process is too slow, and the compilation process will take up a lot of disk space. I tried twice, once for 20GB for the virtual machine, and once for 30GB, but in the end there was no disk space. and terminated the compilation. But looking at the bin file provided by the official is only a few hundred MB, I can't figure it out.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326891728&siteId=291194637