# cd /usr/local/src/ # wget https://github.com/Kitware/CMake/releases/download/v3.27.4/cmake-3.27.4-linux-x86_64.tar.gz # tar -xzvf cmake-3.27.4-linux-x86_64.tar.gz # mv cmake-3.27.4-linux-x86_64 /usr/local/cmake
添加cmake环境变量:
1 2 3
# vim /etc/profile # 尾行,添加配置 export PATH=$PATH:/usr/local/cmake/bin
1 2 3 4 5
# source /etc/profile # cmake --version cmake version 3.27.4
CMake suite maintained and supported by Kitware (kitware.com/cmake).
升级gcc和gfortran:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
# yum install -y centos-release-scl # yum install -y devtoolset-11-gcc devtoolset-11-gcc-gfortran devtoolset-11-gcc-c++ # scl enable devtoolset-11 bash # echo "source /opt/rh/devtoolset-11/enable" >>/etc/profile # gfortran --version GNU Fortran (GCC) 11.2.1 20220127 (Red Hat 11.2.1-9) Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # gcc --version gcc (GCC) 11.2.1 20220127 (Red Hat 11.2.1-9) Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
下载安装nceplibs-bufr-bufr:
下载地址:https://github.com/NOAA-EMC/NCEPLIBS-bufr/
1 2 3 4 5 6 7
# cd /usr/local/src/ # wget https://github.com/NOAA-EMC/NCEPLIBS-bufr/archive/refs/tags/bufr_v12.0.0.zip # unzip bufr_v12.0.0.zip # cd NCEPLIBS-bufr-bufr_v12.0.0/ # mkdir build && cd build # cmake -DCMAKE_INSTALL_PREFIX=path1 -DMASTER_TABLE_DIR=path2 -DENABLE_PYTHON=ON .. # make -j 4 && make -j 4 install