Install Gromacs 2022.2 on Linux debian non GPU version

GROMACS version: 2022.2
GROMACS modification: No
Here post your question

Make Error in /home/Downloads/gromacs-2022.2/build/CMakeFiles/CMakeTmp/CMakeLists.txt:
Imported target “MPI::MPI_C” includes non-existent path

"/usr/lib/x86_64-linux-gnu/openmpi/include"

in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

  • The path was deleted, renamed, or moved to another location.

  • An install or uninstall procedure did not complete successfully.

  • The installation package was faulty and references files it does not
    provide.

CMake Error in /home/lohith/Downloads/gromacs-2022.2/build/CMakeFiles/CMakeTmp/CMakeLists.txt:
Imported target “MPI::MPI_C” includes non-existent path

"/usr/lib/x86_64-linux-gnu/openmpi/include"

in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

  • The path was deleted, renamed, or moved to another location.

  • An install or uninstall procedure did not complete successfully.

  • The installation package was faulty and references files it does not
    provide.

CMake Error at /usr/share/cmake-3.23/Modules/FindMPI.cmake:1264 (try_compile):
Failed to generate test project build system.
Call Stack (most recent call first):
/usr/share/cmake-3.23/Modules/FindMPI.cmake:1315 (_MPI_try_staged_settings)
/usr/share/cmake-3.23/Modules/FindMPI.cmake:1638 (_MPI_check_lang_works)
cmake/gmxManageMPI.cmake:65 (find_package)
CMakeLists.txt:422 (include)

Am facing an error while installing Gromacs to my PC, I have mentioned the errors above, Could anybody help me to solve this issue.

It happens because GROMACS rely on openmpi package. In that case, just install it before building from source:

sudo apt install libopenmpi-dev