From ejfertig at jhmi.edu  Sun Nov 22 15:24:47 2009
From: ejfertig at jhmi.edu (Elana Fertig)
Date: Sun, 22 Nov 2009 09:24:47 -0500
Subject: [Rd] Including local dynamic libraries
In-Reply-To: <40961956-760B-4CEA-A821-87681D71AF67@r-project.org>
References: <180E96B0-E49C-4560-A4D3-808F24E11D9F@jhmi.edu>
	<4B06F712.2000701@dbmail.com>
	<40961956-760B-4CEA-A821-87681D71AF67@r-project.org>
Message-ID: <DCD2789E-6A4E-4C1A-965E-631FAB54DE0E@jhmi.edu>

Thank you all so much!  It seems that using dyn.load() fixes the  
problem.

On Nov 20, 2009, at 8:16 PM, Simon Urbanek wrote:

>
> On Nov 20, 2009, at 3:07 PM, Romain Francois wrote:
>
>> On 11/20/2009 08:43 PM, Elana Fertig wrote:
>>> Hi All,
>>>
>>> I am trying to install the package rjags into a local library on a
>>> machine for which I do not have root permissions.
>>>
>>> Using the command: R CMD INSTALL
>>> --configure-args="--with-jags-include=${JAGSBIN}/include/JAGS
>>> --with-jags-lib=${JAGSBIN}/lib/
>>> --with-jags-modules=${JAGSBIN}/lib/JAGS/modules" CMD INSTALL -l
>>> ${JAGSBIN}/lib/ ../rjags_1.0.3-12.tar.gz
>>>
>>> Where ${JAGSBIN} is defined as a local directory, the installation
>>> seems
>>> to be working fine. Then, I go into R and type the following
>>> commands:
>>>> .libPaths("${JAGSBIN}/lib/")
>>
>> Maybe this :
>>
>> .libPaths( file.path( Sys.getenv("JAGSBIN", "lib" ) ) )
>>
>
> Unlikely - it's probably just a matter of setting LD_LIBRARY_PATH
> correctly .. not really an R issue at all ...
>
> Cheers,
> S
>
>
>>>> library("rjags")
>>>
>>> I get the following error
>>>
>>> Loading required package: coda
>>> Loading required package: lattice
>>> Error in dyn.load(file, DLLpath = DLLpath, ...) :
>>> unable to load shared library '${JAGSBIN}/lib/rjags/libs/rjags.so':
>>> libjags.so.1: cannot open shared object file: No such file or
>>> directory
>>> Error : .onLoad failed in 'loadNamespace' for 'rjags'
>>> Error: package/namespace load failed for 'rjags'
>>>
>>> Ideally, I would fix this problem by adding the appropriate
>>> libraries to
>>> /user/local/lib64 . However, since I do not have root permissions I
>>> am
>>> not able to make this addition. How can I have R recognize c++
>>> libraries
>>> from my local path?
>>>
>>> Thanks so much in advance for your help.
>>
>>
>> -- 
>> Romain Francois
>> Professional R Enthusiast
>> +33(0) 6 28 91 30 30
>> http://romainfrancois.blog.free.fr
>> |- http://tr.im/EAD5 : LondonR slides
>> |- http://tr.im/BcPw : celebrating R commit #50000
>> `- http://tr.im/ztCu : RGG #158:161: examples of package IDPmisc
>>
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>>
>



[Rd] Including local dynamic libraries
Elana Fertig