Error: LAMMPS requires a C++11 or later complaint compiler. Enable C++ compatilibity or upgrade the compiler

Hello There,

My name is Michael, I am trying to install lammps with openkim in a Cloud VM, that operates with Ubuntu 18.04.

I followed the steps here : Installing KIM package in LAMMPS - #4 by relliott
but when I run “make serial”, I get the error

…/lmptype.h:34:2: error: #error LAMMPS requires a C++11 (or later) compliant compiler. Enable C++11 compatibility or upgrade the compiler.
#error LAMMPS requires a C++11 (or later) compliant compiler. Enable C++11 compatibility or upgrade the compiler.
^

Please does anyone have the solution for this

How about reading the documentation?
https://docs.lammps.org/latest/Build_make.html

BTW: The information you provide must be incorrect. Ubuntu 18.04 ships with GCC 7.5 which does support C++11 by default and thus would not require any modifications of the serial (or other) makefile and would not produce the error message you see.

Perhaps this is the key piece of info you need?

https://docs.lammps.org/Build_settings.html#cxx11

Ryan

Thank you @akohlmey , I further investigated the VM and found out it was actually running 16.04, I have upgraded it , and it installs properly, Thanks!

Thank Ryan, I opted to upgrade my complier. Thanks!