1、安装gcc7.x.x版本
# yum install centos-release-scl # yum install devtoolset-7 # source /opt/rh/devtoolset-7/enable
2、安装cmake
# yum install -y gcc gcc-c++ openssl-devel # wget https://github.com/Kitware/CMake/releases/download/v3.28.1/cmake-3.28.1.tar.gz # tar zxvf cmake-3.28.1.tar.gz # cd cmake-3.28.1 # ./configure --prefix=/usr/local/cmake # make && make install # export PATH=/usr/local/cmake/bin:$PATH
3、安装eccodes
eccodes官方下载地址:https://confluence.ecmwf.int/display/ECC/Releases
# yum install openjpeg-devel jasper-devel numpy -y # tar -zxvf eccodes-2.33.0-Source.tar.gz # mkdir build && cd build # cmake ../eccodes-2.33.0-Source -DCMAKE_INSTALL_PREFIX=/opt/usr/eccodes -DENABLE_AEC=OFF # make && make install # export PATH=/opt/usr/eccodes/bin:$PATH
特别说明:
如果是用的debian系统,就可以直接通过apt安装,debian官方是提供eccodes的deb包的(https://packages.debian.org/zh-tw/sid/libeccodes-tools)
# apt install libeccodes-tools libeccodes-dev
转载请注明:LINUX服务器运维架构技术分享 » CentOS 编译安装eccodes