You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu系统安装Repast HPC时netCDF安装z library缺失报错求助

报错说明

编译安装netCDF时因缺少zlib依赖库导致配置流程中断,对应报错信息如下:

configure: error: Can't find or link to the z library. Turn off netCDF-4 and      opendap with --disable-netcdf-4 --disable-dap, or see config.log for errors.
可行解决步骤
  • 优先安装Ubuntu官方源内的zlib开发包,执行命令:
    sudo apt update && sudo apt install zlib1g-dev -y
  • 依赖安装完成后重新运行netCDF安装脚本即可。如果仍报相同错误,手动指定zlib安装路径重新编译netCDF,执行configure命令时追加参数:
    ./configure --with-zlib=/usr
  • 如果你不需要使用netCDF-4和opendap功能,也可以直接按照报错提示关闭对应功能跳过zlib依赖检查,执行configure命令时追加参数:
    ./configure --disable-netcdf-4 --disable-dap

内容的提问来源于stack exchange,提问作者Tom Snow

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.09.30 15:30:02