Redhat's Security Enhanced Linux (in some modes)
generates messages like that when code in a shared library
is not compiled to have position independent code.
I.e., the -fpic or -fPIC flag was not supplied when
compiling. Your build log showed that -fpic was used
when compiling your code, but the 3rd party library,
libnetcdf.a may not have been compiled this way.
The command
eu-findtextrel /usr/lib/R/library/ncdf/libs/ncdf.so
will tell you which parts of ncdf.so were not compiled
with -fpic.
If you cannot recompile libnetcdf.a then you may have
to turn off some the security enhancements.
See
http://people.redhat.com/drepper/textrelocs.html
and
http://people.redhat.com/drepper/selinux-mem.html
for technical details.
Bill Dunlap
TIBCO Software Inc - Spotfire Division
wdunlap tibco.com
------------------------------------------------------------------------
Peter Dalgaard P.Dalgaard at biostat.ku.dk
Tue Apr 21 16:28:00 CEST 2009
Bala subramanian wrote:> Hi,
> I tried to install from four different mirrors. The result is the same. I
> dnt understand what the following error means.
> /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'
>
> I even tried to change the permission of ncdf.so but still i am not able to
> load the library.
Nothing to do with the download. I think SElinux is getting in your way
(so your unstated system could be RedHat Enterprise Linux?).
Contact your sysadm or google for the error message.
(One of the hits suggests that you might need to run
chcon -t texrel_shlib_t ncdf.so
but, well, no warranties...)
>
> Bala
>
>
> On Tue, Apr 21, 2009 at 2:03 PM, Dimitri Liakhovitski <ld7631 at
gmail.com>wrote:
>
>> Try to install from scratch from a different mirror.
>> Dimitri
>>
>> On Tue, Apr 21, 2009 at 6:21 AM, Bala subramanian
>> <bala.biophysics at gmail.com> wrote:
>>> Hi,
>>> Yes ncdf needs netcdf, netcdf is already installed in my fedora10.
I
>>> reinstalled ncdf with the following option
>>>> install.packages('ncdf',dep=TRUE)
>>>> library(ncdf)> 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'
>>>
>>> Again the same error,
>>> Bala
>>>
>>>
>>> On Tue, Apr 21, 2009 at 12:12 PM, Liviu Andronic <landronimirc
at gmail.com
>>> wrote:
>>>
>>>> On Tue, Apr 21, 2009 at 11:57 AM, Bala subramanian
>>>> <bala.biophysics at gmail.com> wrote:
>>>>> 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.
>>>>>
>>>> Does ncdf depend on netcdf [1]? If so, perhaps it is missing,
or is
>>>> not up-to-date. Also, it's a good habit to
install.packages('ncdf',
>>>> dep=TRUE).
>>>> Regards,
>>>> Liviu
>>>>
>>>> [1] http://www.unidata.ucar.edu/software/netcdf/
>>>>
>>> [[alternative HTML version deleted]]
>>>
>>> ______________________________________________
>>> 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.
>>>
>>
>>
>> --
>> Dimitri Liakhovitski
>> MarketTools, Inc.
>> Dimitri.Liakhovitski at markettools.com
>>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
--
O__ ---- Peter Dalgaard ?ster Farimagsgade 5, Entr.B
c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907