我需要在 R 3.4.0 上安装 ncdf4 包,但它失败并告诉我错误“找不到 -lnetcdf”。如何成功安装 ncdf4。
/root/anaconda3/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.2.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: cannot find -lnetcdf
make: *** [ncdf4.so] 错误 1
ERROR: compilation failed for package ‘ncdf4’
* removing ‘/root/R/x86_64-conda_cos6-linux-gnu-library/3.4/ncdf4’
下载的程序包在
‘/tmp/Rtmpo9mtLQ/downloaded_packages’里
Warning message:
In install.packages("ncdf4") : 安装程序包‘ncdf4’时退出狀態的值不是0