鱼鱼9901 2023-04-07 00:44 采纳率: 0%
浏览 300

centos7下载gromacs显示requires the language dialect "CXX17" .

centos7下载gromacs
gromacs是2021.5版本

fftw是3.3.8

cmake 3.21.4

python2.7.5

CMake Error in /usr/local/sob/gromacs-2021.5/build/CMakeFiles/CMakeScratch/TryCompile-jz3Vlr/CMakeLists.txt:
  Target "cmTC_b8645" requires the language dialect "CXX17" .  But the
  current compiler "GNU" does not support this, or CMake does not know the
  flags to enable it.


CMake Error at /usr/local/share/cmake-3.26/Modules/FindOpenMP.cmake:219 (try_compile):
  Failed to generate test project build system.
Call Stack (most recent call first):
  /usr/local/share/cmake-3.26/Modules/FindOpenMP.cmake:483 (_OPENMP_GET_FLAGS)
  cmake/gmxManageOpenMP.cmake:43 (find_package)
  CMakeLists.txt:292 (include)

  • 写回答

1条回答 默认 最新

  • 流浪字节π 2024-01-18 13:33
    关注

    这个问题是由于Gromacs需要C++17语言支持所导致的。需要安装gcc7或以上的版本来支持C++17。
    以下是在CentOS 7上安装gcc7的步骤:

    1. 添加devtoolset-7存储库
      yum install centos-release-scl
    2. 安装gcc7和devtoolset-7工具链
      yum install devtoolset-7-gcc devtoolset-7-gcc-c++
    3. 启用devtoolset-7工具链
      scl enable devtoolset-7 bash
    4. 检查GCC版本
      gcc -v

    望采纳。

    评论

报告相同问题?

问题事件

  • 创建了问题 4月7日