无法安装ncdf4,错误nc-config… no:
‘getOption(“repos”)’ replaces Bioconductor standard repositories, see ‘help(“repositories”, package = “BiocManager”)’ for details. Replacement repositories: CRAN: https://cloud.r-project.org Bioconductor version 3.21 (BiocManager 1.30.25), R 4.5.0 (2025-04-11) Installing package(s) ‘ncdf4’试开URL’https://cloud.r-project.org/src/contrib/ncdf4_1.24.tar.gz’ Content type ‘application/x-gzip’ length 126032 bytes (123 KB) ================================================== downloaded 123 KB * installing *source* package ‘ncdf4’ … ** this is package ‘ncdf4’ version ‘1.24’ ** 成功将‘ncdf4’程序包解包并MD5和检查 ** using staged installation configure.ac: starting user specified nc-config is /home/joe/path/to/nc-config checking for nc-config… no ———————————————————————————– Error, nc-config not found or not executable. This is a script that comes with the netcdf library, version 4.1-beta2 or later, and must be present for configuration to succeed. If you installed the netcdf library (and nc-config) in a standard location, nc-config should be found automatically. Otherwise, you can specify the full path and name of the nc-config script by passing the –with-nc-config=/full/path/nc-config argument flag to the configure script. For example: ./configure –with-nc-config=/sw/dist/netcdf4/bin/nc-config Special note for R users: ————————- To pass the configure flag to R, use something like this: R CMD INSTALL –configure-args=”–with-nc-config=/home/joe/bin/nc-config” ncdf4 where you should replace /home/joe/bin etc. with the location where you have installed the nc-config script that came with the netcdf 4 distribution.
警告信息:
In install.packages(…) : 安装程序包‘ncdf4’时退出狀態的值不是0
解决:
sudo apt-get update -y
sudo apt-get install -y libnetcdf-dev
本站原创,如若转载,请注明出处:https://www.ouq.net/3807.html