Grokbase Groups R r-help October 2010
FAQ
Hello all,

I could use some help installing the ncdf4 package in R (under CentOS 5.4).
I've installed R-2.12.0, zlib-1.2.5, hdf5-1.8.4-patch1 and NetCDF4.1.1 from
source. Make check reports all tests have passed for all of these programs.

When I issue an 'install.packages(c('ncdf4')) in R, compilation succeeds but
I receive the following error during the loading phase of installation:

** building package indices ...
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object
'/usr/local/lib64/R/library/ncdf4/libs/ncdf4.so':
libnetcdf.so.6: cannot open shared object file: No such file or directory
ERROR: loading failed
* removing ?/usr/local/lib64/R/library/ncdf4?

Can someone point me in the right direction to resolve this error?

Thanks in advance
--
View this message in context: http://r.789695.n4.nabble.com/ncdf4-package-installation-in-R-tp3014219p3014219.html
Sent from the R help mailing list archive at Nabble.com.

Search Discussions

  • David Pierce at Oct 26, 2010 at 6:22 pm

    shaticus wrote:
    Hello all,

    I could use some help installing the ncdf4 package in R (under CentOS
    5.4).
    ...
    When I issue an 'install.packages(c('ncdf4')) in R, compilation succeeds
    but
    I receive the following error during the loading phase of installation:

    ** building package indices ...
    Error in dyn.load(file, DLLpath = DLLpath, ...) :
    unable to load shared object
    '/usr/local/lib64/R/library/ncdf4/libs/ncdf4.so':
    libnetcdf.so.6: cannot open shared object file: No such file or
    directory
    ERROR: loading failed
    * removing ??/usr/local/lib64/R/library/ncdf4??
    Hello,

    R is not finding the netcdf library that you compiled and, presumably,
    installed. If you installed the netcdf library in a standard place, such
    as /usr/local/lib, it would probably be found by default. If you don't
    want to (or can't) install in a standard location, the easiest fix is to
    add the location where you installed the netcdf library to your
    LD_LIBRARY_PATH environmental variable. For example, if the netcdf libary
    is in /opt/sw/netcdf/lib, then you'd add that directory to
    LD_LIBRARY_PATH.

    Hope that helps,

    --Dave

    -------------------------------------------------------------------
    David W. Pierce
    Division of Climate, Atmospheric Science, and Physical Oceanography
    Scripps Institution of Oceanography
    (858) 534-8276 (voice) / (858) 534-8561 (fax) dpierce at ucsd.edu
  • Shaticus at Oct 26, 2010 at 8:07 pm
    Thanks David!
    After setting the LD_LIBRARY_PATH variable(to /usr/local/lib) R was able to
    successfully install the ncdf4 package.


    On Tue, Oct 26, 2010 at 2:24 PM, David Pierce [via R] <
    ml-node+3014258-455613790-200560@n4.nabble.comwrote:
    shaticus wrote:
    Hello all,

    I could use some help installing the ncdf4 package in R (under CentOS
    5.4).
    ...
    When I issue an 'install.packages(c('ncdf4')) in R, compilation succeeds
    but
    I receive the following error during the loading phase of installation:

    ** building package indices ...
    Error in dyn.load(file, DLLpath = DLLpath, ...) :
    unable to load shared object
    '/usr/local/lib64/R/library/ncdf4/libs/ncdf4.so':
    libnetcdf.so.6: cannot open shared object file: No such file or
    directory
    ERROR: loading failed
    * removing â/usr/local/lib64/R/library/ncdf4â
    Hello,

    R is not finding the netcdf library that you compiled and, presumably,
    installed. If you installed the netcdf library in a standard place, such
    as /usr/local/lib, it would probably be found by default. If you don't
    want to (or can't) install in a standard location, the easiest fix is to
    add the location where you installed the netcdf library to your
    LD_LIBRARY_PATH environmental variable. For example, if the netcdf libary
    is in /opt/sw/netcdf/lib, then you'd add that directory to
    LD_LIBRARY_PATH.

    Hope that helps,

    --Dave

    -------------------------------------------------------------------
    David W. Pierce
    Division of Climate, Atmospheric Science, and Physical Oceanography
    Scripps Institution of Oceanography
    (858) 534-8276 (voice) / (858) 534-8561 (fax) [hidden email]<http://user/SendEmail.jtp?type=node&node=3014258&i=0>

    ______________________________________________
    [hidden email] <http://user/SendEmail.jtp?type=node&node=3014258&i=1>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.


    ------------------------------
    View message @
    http://r.789695.n4.nabble.com/ncdf4-package-installation-in-R-tp3014219p3014258.html
    To unsubscribe from ncdf4 package installation in R, click here<http://r.789695.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_code&node=3014219&code=bXNoYXRsZXlAdWRlbC5lZHV8MzAxNDIxOXwtMzk0NjMxNDE1>.

    --
    View this message in context: http://r.789695.n4.nabble.com/ncdf4-package-installation-in-R-tp3014219p3014426.html
    Sent from the R help mailing list archive at Nabble.com.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupr-help @
categoriesr
postedOct 26, '10 at 6:07p
activeOct 26, '10 at 8:07p
posts3
users2
websiter-project.org
irc#r

2 users in discussion

Shaticus: 2 posts David Pierce: 1 post

People

Translate

site design / logo © 2022 Grokbase