Thanks very much for your help, Uwe. I can compile the package, but when
load the package, it cannot find the share lib, as the error message:

** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
   unable to load shared object
'/data1/zhucai/local/R-2.15.1/
library/gsl/libs/gsl.so':
   libgsl.so.0: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/data1/zhucai/local/R-2.15.1/library/gsl’

I think it may because the environment LD_LIBRARY_PATH, but I do not know
how to configure R to find the share lib under my path for that package, so
I am trying to write a configure document for my own account on serve,
hoping this can solve the problem.

2012/7/25 Uwe Ligges <ligges@statistik.tu-dortmund.de>

> Looking at the gsl code suggest you can set environmant variables that are
> used by configure, hence setting
>
> GSL_CFLAGS = -I/data1/zhucai/local/gsl/**include
> GSL_LIBS   = -L/data1/zhucai/local/gsl/lib -lgsl -lgslcblas
>
> before  R CMD INSTALL  should do the trick (untested).
>
> Uwe Ligges
>
>
>
>
> On 24.07.2012 11:36, cai zhu wrote:
>
>> Dear R users:
>>
>> I have a problem when installing the R package *gsl*. The procedure is as
>>
>> follows:
>>
>> (1) Since it needs a GSL vesion >=1.12, and the GSL library on the serve I
>> use is too old, I download GSL 1.15 and install it in my own account, such
>> as $HOME/local/gsl.  Because I do not have root access, so it cannot be
>> installed in standard folder.
>>
>> (2) Then I download the source code of R pakage gsl, since I cannot use
>> the
>> command *export*, the solution in the package manual *PAGE 29-30* does not
>>
>> work for me. I use command as follows to install the package:
>>
>> R CMD INSTALL
>> --configure-args="LDFLAGS=-L/**data1/zhucai/local/gsl/lib;**
>> PKG_LIBS=-L/data1/zhucai/**local/gsl/lib;PKG_CPPFLAGS=-I/**
>> data1/zhucai/local/gsl/**include"
>> 'gsl_1.9-9.tar.gz'
>>
>> Then I can bypass the version check and  compile the package, however, the
>> error message is as follows
>>
>> ** package ‘gsl’ successfully unpacked and MD5 sums checked
>> checking for gsl-config... /usr/local/bin/gsl-config
>> checking if GSL version >= 1.12... checking for gcc... gcc
>> 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 accepts -g... yes
>> checking for gcc option to accept ISO C89... none needed
>> configure: error: Need GSL version >= 1.12
>> ** libs
>> .....compile
>> installing to /data1/zhucai/local/R-2.15.1/**library/gsl/libs
>> ** R
>> ** inst
>> ** preparing package for lazy loading
>> ** help
>> *** installing help indices
>> ** building package indices
>> ** installing vignettes
>>     ‘gslpaper.Rnw’
>> ** testing if installed package can be loaded
>> Error in dyn.load(file, DLLpath = DLLpath, ...) :
>>    unable to load shared object
>> '/data1/zhucai/local/R-2.15.1/**library/gsl/libs/gsl.so':
>>    libgsl.so.0: cannot open shared object file: No such file or directory
>> Error: loading failed
>> Execution halted
>> ERROR: loading failed
>> * removing ‘/data1/zhucai/local/R-2.15.1/**library/gsl’
>>
>> I know it may be because LB_LIBRARY_PATH, but I cannot contract with
>> administer easily and no right to modify it, so how can I do about it?
>> BTW,
>> the R I used is also installed locally in my own account, which is 2.15.1.
>> Any help is appreciated. Thank you very much.
>>
>> Regards
>>                     ZHU Cai
>>
>>         [[alternative HTML version deleted]]
>>
>>
>>
>> ______________________________**________________
>> R-help@r-project.org mailing list
>> https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help>
>> PLEASE do read the posting guide http://www.R-project.org/**
>> posting-guide.html <http://www.R-project.org/posting-guide.html>
>> and provide commented, minimal, self-contained, reproducible code.
>>
>>

	[[alternative HTML version deleted]]

