Dear Simon, I installed the ncdf package in the way you suggested but still i got the same error i got before. I haves pasted below the installation log and errors.
> *install.packages('ncdf')* Warning in install.packages("ncdf") : argument 'lib' is missing: using '/usr/lib/R/library' --- Please select a CRAN mirror for use in this session --- Loading Tcl/Tk interface ... done trying URL ' http://rm.mirror.garr.it/mirrors/CRAN/src/contrib/ncdf_1.6.tar.gz' Content type 'application/x-gzip' length 72533 bytes (70 Kb) opened URL ================================================== downloaded 70 Kb * Installing *source* package 'ncdf' ... checking for gcc... gcc -m32 -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 -m32 -std=gnu99 accepts -g... yes checking for gcc -m32 -std=gnu99 option to accept ANSI C... none needed checking how to run the C preprocessor... gcc -m32 -std=gnu99 -E checking for egrep... grep -E checking for ANSI C header files... yes 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 Found netcdf.h in: . checking for nc_open in -lnetcdf... yes Found netcdf library file libnetcdf.a in directory . configure: creating ./config.status config.status: creating R/load.R config.status: creating src/Makevars ** libs gcc -m32 -std=gnu99 -I/usr/include/R -I. -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -c ncdf2.c -o ncdf2.o gcc -m32 -std=gnu99 -I/usr/include/R -I. -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -c ncdf3.c -o ncdf3.o ncdf3.c: In function R_nc_get_vara_charvarid: ncdf3.c:221: warning: assignment discards qualifiers from pointer target type ncdf3.c: In function R_nc_get_vara_numvarid: ncdf3.c:267: warning: assignment discards qualifiers from pointer target type ncdf3.c:249: warning: rv_data may be used uninitialized in this function gcc -m32 -std=gnu99 -I/usr/include/R -I. -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -c ncdf.c -o ncdf.o ncdf.c: In function R_nc_ttc_to_nctype: ncdf.c:424: warning: implicit declaration of function exit ncdf.c:424: warning: incompatible implicit declaration of built-in function exit gcc -m32 -std=gnu99 -shared -L/usr/local/lib -o ncdf.so ncdf2.o ncdf3.o ncdf.o -L. -lnetcdf -L/usr/lib/R/lib -lR ** R ** preparing package for lazy loading ** help >>> Building/Updating help pages for package 'ncdf' Formats: text html latex example ancdf text html latex aput.var.ncdf text html latex example Note: unmatched right brace in file 'att.get.ncdf.Rd' on or after line 6 att.get.ncdf text html latex example att.put.ncdf text html latex example close.ncdf text html latex example create.ncdf text html latex example dim.def.ncdf text html latex example enddef.ncdf text html latex example get.var.ncdf text html latex example ncdf-internal text html latex open.ncdf text html latex example print.ncdf text html latex example redef.ncdf text html latex example set.missval.ncdf text html latex example sync.ncdf text html latex example var.add.ncdf text html latex example var.def.ncdf text html latex example Note: unmatched right brace in file 'version.ncdf.Rd' on or after line 6 Note: removing empty section \arguments in file 'version.ncdf.Rd' version.ncdf text html latex ** building package indices ... ** DONE (ncdf)* The downloaded packages are in /tmp/RtmpKrf8Vc/downloaded_packages Updating HTML index of packages in '.Library' > *library(ncdf)* Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared library '/usr/lib/R/library/ncdf/libs/ncdf.so': /usr/lib/R/library/ncdf/libs/ncdf.so: cannot restore segment prot after reloc: Permission denied Error in library(ncdf) : .First.lib failed for 'ncdf' What should i do now ? Bala On Tue, Apr 21, 2009 at 10:48 AM, Simon Pickett <simon.pick...@bto.org>wrote: > Hi, > > Check out the FAQ on the home page about installing packages. > > You need to > 1. Install the package from a local mirror, you can do this from the drop > down menu ("Install packages") > 2. then call the package using "library(name of the package)" > > It helps to know where your R library directory is on your computer. > > HTH Simon. > > > ----- Original Message ----- From: "Bala subramanian" < > bala.biophys...@gmail.com> > To: <r-help@r-project.org> > Sent: Tuesday, April 21, 2009 9:34 AM > Subject: [R] joined R-today > > > Friends, >> >> I am a newbie to R. Just installed and started with R. I installed netcdf >> library (netcdf-4.0.tar.gz) and then ncdf package of R from CRAN with the >> following command. >> >> R CMD INSTALL >> --configure-args="-with-netcdf_incdir=/usr/local/netcdf/include >> -with-netcdf_libdir=/usr/local/netcdf/lib" ncdf_1.6.tar.gz >> >> The installation was successful. But when i try to use ncdf inside R, i >> get >> the following error. Kindly help me how to resolve the problem. >> >> trjfile<-system.file('test.netcdf',package='bio3d') >>> trj<-read.ncdf(trjfile) >>> >> Loading required package: ncdf >> Error in dyn.load(file, DLLpath = DLLpath, ...) : >> unable to load shared library '/usr/lib/R/library/ncdf/libs/ncdf.so': >> /usr/lib/R/library/ncdf/libs/ncdf.so: cannot restore segment prot after >> reloc: Permission denied >> Error in read.ncdf(trjfile) : Please install the ncdf package from CRAN >> >> Thanks in advance, >> Bala >> >> [[alternative HTML version deleted]] >> >> ______________________________________________ >> R-help@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. >> >> > [[alternative HTML version deleted]]
______________________________________________ R-help@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.