[R] Receive "unable to load shared object RNetCDF.o" during R INSTALL of RNetCDF

Paul Hiemstra paul.hiemstra at knmi.nl
Tue Sep 6 13:26:13 CEST 2011


You could try installing the ncdf package. This installed for my without
any problems when RNetCDF failed. I suspect ncdf has very similar
functionality, but i've only worked with ncdf.


should do the trick...


On 09/05/2011 08:56 PM, David Brown wrote:
> On a Red Hat Linux cluster I am seeing the following after multiple
> other packages were successfully installed. The error seems to suggest
> that RNetCDF.o was not copied to the appropriate lib folder. The admin
> user performing the install has the required privileges to perform the
> install. Words of wisdom are greatly appreciated:
> R CMD INSTALL --configure-args="--with-netcdf-include='/soft/local/netcdf/netcdf-3.6.2/include/'
> --with-netcdf-lib='/soft/local/netcdf/netcdf-3.6.2/libso'
> --with-udunits-include='/soft/local/udunits-2.1.23/include'
> --with-udunits-lib='/soft/local/udunits-2.1.23/lib'"
> RNetCDF_1.5.2-2.tar.gz
> * installing to library ‘/soft/local/r/R-2.13.1/lib64/R/library’
> * installing *source* package ‘RNetCDF’ ...
> checking for gcc... gcc -std=gnu99
> checking for C compiler default output file name... a.out
> checking whether the C compiler works... yes
> checking whether we are cross compiling... no
> checking for suffix of executables...
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc -std=gnu99 accepts -g... yes
> checking for gcc -std=gnu99 option to accept ISO C89... none needed
> checking for nc_open in -lnetcdf... yes
> checking for utInit in -ludunits2... no
> checking for utScan in -ludunits2... yes
> checking how to run the C preprocessor... gcc -std=gnu99 -E
> checking for grep that handles long lines and -e... /bin/grep
> checking for egrep... /bin/grep -E
> checking for ANSI C header files... no
> checking for sys/types.h... yes
> checking for sys/stat.h... yes
> checking for stdlib.h... yes
> checking for string.h... yes
> checking for memory.h... yes
> checking for strings.h... yes
> checking for inttypes.h... yes
> checking for stdint.h... yes
> checking for unistd.h... yes
> checking netcdf.h usability... yes
> checking netcdf.h presence... yes
> checking for netcdf.h... yes
> checking udunits.h usability... yes
> checking udunits.h presence... yes
> checking for udunits.h... yes
> configure: creating ./config.status
> config.status: creating R/load.R
> config.status: creating src/Makevars
> ** libs
> gcc -std=gnu99 -I/soft/local/r/R-2.13.1/lib64/R/include
> -I/soft/local/udunits-2.1.23/include
> -I/soft/local/netcdf/netcdf-3.6.2/include/  -I/usr/local/include
> -fpic  -g -O2 -c RNetCDF.c -o RNetCDF.o
> gcc -std=gnu99 -shared -L/usr/local/lib64 -o RNetCDF.so RNetCDF.o
> -ludunits2 -lnetcdf -L/soft/local/udunits-2.1.23/lib
> -L/soft/local/netcdf/netcdf-3.6.2/libso -lexpat
> installing to /soft/local/r/R-2.13.1/lib64/R/library/RNetCDF/libs
> ** R
> ** preparing package for lazy loading
> ** help
> *** installing help indices
> ** building package indices ...
> ** testing if installed package can be loaded
> Error in dyn.load(file, DLLpath = DLLpath, ...) :
>   unable to load shared object
> '/soft/local/r/R-2.13.1/lib64/R/library/RNetCDF/libs/RNetCDF.so':
>   libudunits2.so.0: cannot open shared object file: No such file or directory
> Error: loading failed
> Execution halted
> ERROR: loading failed
> * removing ‘/soft/local/r/R-2.13.1/lib64/R/library/RNetCDF’
> [swadm at boar01]/soft/local/temp%
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

Paul Hiemstra, Ph.D.
Global Climate Division
Royal Netherlands Meteorological Institute (KNMI)
Wilhelminalaan 10 | 3732 GK | De Bilt | Kamer B 3.39
P.O. Box 201 | 3730 AE | De Bilt
tel: +31 30 2206 494


More information about the R-help mailing list