我需要在 Ubuntu 18.04 上安装和编译 SURFEX 代码。为此,我正在关注此处的文档。这很顺利,直到我尝试使用make
. 我得到了错误 127。我查了这个错误的含义,但我真的不明白它在这种情况下的含义。非常感谢任何帮助。
完整留言如下
[ ! -d /home/sarah/MYDIR/open_surfex_v8_1_20210914/open_SURFEX_V8_1/src/LIB/eccodes-2.18.0-LXgfortran-build ] && mkdir -p /home/sarah/MYDIR/open_surfex_v8_1_20210914/open_SURFEX_V8_1/src/LIB/eccodes-2.18.0-LXgfortran-build
Makefile:422: recipe for target '/home/sarah/MYDIR/open_surfex_v8_1_20210914/open_SURFEX_V8_1/src/LIB/eccodes-2.18.0-Source-LXgfortran/include/grib_api.mod' failed
make: [/home/sarah/MYDIR/open_surfex_v8_1_20210914/open_SURFEX_V8_1/src/LIB/eccodes-2.18.0-Source-LXgfortran/include/grib_api.mod] Error 1 (ignored)
cd /home/sarah/MYDIR/open_surfex_v8_1_20210914/open_SURFEX_V8_1/src/LIB/eccodes-2.18.0-LXgfortran-build && \
cmake /home/sarah/MYDIR/open_surfex_v8_1_20210914/open_SURFEX_V8_1/src/LIB/eccodes-2.18.0-Source -DCMAKE_INSTALL_PREFIX=/home/sarah/MYDIR/open_surfex_v8_1_20210914/open_SURFEX_V8_1/src/LIB/eccodes-2.18.0-Source-LXgfortran -DBUILD_SHARED_LIBS=ON \
-DENABLE_NETCDF=OFF -DENABLE_JPG=OFF -DENABLE_PYTHON=OFF -DENABLE_EXAMPLES=OFF \
-DCMAKE_Fortran_COMPILER=f77 -DCMAKE_C_COMPILER=mpicc \
-DCMAKE_Fortran_FLAGS= -DCMAKE_C_FLAGS= && \
make && make install && make clean
/bin/sh: 2: cmake: not found
Makefile:422: recipe for target '/home/sarah/MYDIR/open_surfex_v8_1_20210914/open_SURFEX_V8_1/src/LIB/eccodes-2.18.0-Source-LXgfortran/include/grib_api.mod' failed
make: *** [/home/sarah/MYDIR/open_surfex_v8_1_20210914/open_SURFEX_V8_1/src/LIB/eccodes-2.18.0-Source-LXgfortran/include/grib_api.mod] Error 127
根据编译日志
您必须安装提供可执行文件的软件包
cmake
Ubuntu 18.04.6 LTS SURFEX 安装的可重现方法如下: