The error indicates that the GCC compiler you are using does not support "-mavx2" option. This option is supposed to enable the use of AVX2 extended instruction sets in the code that you are compiling the program into. As extensions to the x86 instruction set, AVX/AVX2 is designed to improve the performance and parallelism of floating-point intensive computations.
The "mavx2" option is supported by GCC version 4.7 and higher. Check your GCC version:
Most likely the GCC compiler installed on your CentOS is too old to support "mavx2" option.
For example, CentOS 6.X comes with GCC version 4.4.7. If you want to upgrade GCC to versioin 4.7 on CentOS 6.X, you can install devtools. Refer to this guideline to upgrade GCC on CentOS.
Another option is to upgrade to CentOS 7 which comes with GCC 4.8.
Subscribe to Ask Xmodulo
Do you want to receive Linux related questions & answers published at Ask Xmodulo? Enter your email address below, and we will deliver our Linux Q&A straight to your email box, for free. Delivery powered by Google Feedburner.
Did you find this tutorial helpful? Then please be generous and support Xmodulo!