Centos7安装netcdf和cmake
安装环境: CentOS Linux release 7.5
一、安装netcdf4.*以上,两种安装方式:
1. yum安装
[root@localhost ~]# yum install netcdf netcdf-devel -y
只要不报错,证明已经安装好了,可以看到版本是4.3.3
如果提示没有包可安装的话,要换epel源再安装
[root@localhost ~]# yum install epel-release.noarch -y
[root@localhost ~]# yum clean all
[root@localhost ~]# yum makecache
[root@localhost ~]# yum install netcdf netcdf-devel -y
2. 编译安装
比较繁琐,暂时没测试
二、安装cmake3.1以上
1. 编译安装
[root@localhost ~]# cd /opt/
[root@localhost opt]# yum install wget gcc gcc-c++ -y
[root@localhost opt]# wget https://cmake.org/files/v3.3/cmake-3.3.2.tar.gz
[root@localhost opt]# tar xf cmake-3.3.2.tar.gz
[root@localhost opt]# cd cmake-3.3.2
[root@localhost cmake-3.3.2]# ./bootstrap
[root@localhost cmake-3.3.2]# gmake
[root@localhost cmake-3.3.2]# make install
[root@localhost cmake-3.3.2]# cmake --version
能看到版本号,说明已经安装好了