[R] rimage package broken with fedora upgrade

John Kornak john.kornak at ucsf.edu
Tue Jan 2 00:26:45 CET 2007

Thanks to Jonathan and Oleg for their suggestions/comments. Their
responses are added at the end of this email.

I tried Oleg's suggestion of giving me write permissions on
/usr/lib/R/library. This didn't seem to work (I tried various
combinations of changing permissions and ownership but nothing worked).
Anyway, before changing permissions the library would not work when R
was fired up as root. I am by no means a linux/unix expert and maybe
there is some method of giving me write permissions that would have
solved the problem.

Jonathan was right that his was essentially a different problem. I
already had fftw2 installed.

My (heavy-handed) solution was to bite the bullet and re-install fedora 
core 6 from scratch. (Apparently the upgrade from fc3 does not work as 
well as back up + fresh install.) After running yum update, I then 
installed R by clicking the relevant R RPM in CRAN. I subsequently 
installed fftw2 and fftw2-devel (using "yum install package_name") (the 
development package is needed) and installed rimage using 
install.packages("rimage") within R and everything is now fine. Note 
that it is also necessary to install libjpeg and libjpeg-devel if you do 
not already have it.

I hope that this helps others that want

I am looking forward to playing with Oleg's EBimage package.

Thanks again and Happy New Year to all!



John Kornak,PhD
Assistant Professor
Departments of Radiology, and Epidemiology & Biostatistics
University of California, San Francisco
Box 0946
San Francisco, CA 94143
Tel: (415) 353-4740
fax: (415) 353-9423
Email: john.kornak at ucsf.edu

Jonathan Baron wrote:
> Responding to the original post, which I did not save.
>> On 31/12/06, John Kornak <john.kornak at ucsf.edu> wrote:
>>> Dear R list members
>>> I would be grateful if anyone could guide me to a solution for fixing my
>>> rimage package problem described below.
>>> I recently upgraded my machine from fedora core 3 to fedora core 6 and
>>> then upgraded R from version 2.3.1 from version 2.4.1.
>>> I then fired up R, tried to load the rimage library and received the
>>> following messages:
>>>   > library(rimage)
>>> Error in dyn.load(x, as.logical(local), as.logical(now)) :
>>>          unable to load shared library
>>> '/usr/lib/R/library/rimage/libs/rimage.so':
>>>    /usr/lib/R/library/rimage/libs/rimage.so: cannot restore segment prot
>>> after reloc: Permission denied
>>> Error in library(rimage) : .First.lib failed for 'rimage'

Jonathan Baron wrote:

> I had the same problem, but, unfortunately, a slightly different error 
> message.  My error message said:
>> library(rimage)
> Error in dyn.load(x, as.logical(local), as.logical(now)) : 
>         unable to load shared library
> '/usr/lib/R/library/rimage/libs/rimage.so':
>   libfftw.so.2: cannot open shared object file: No such file or
> directory
> Error in library(rimage) : .First.lib failed for 'rimage'
> So I took the hint and said
> yum install libfftw.so.2
> and this installed libfftw,
> which cured the problem.
> But you did not get this error message about libfftw.
> Jon

Oleg Sklyar wrote:

Cannot help you much with that as the thing seems to compile normally.
As you use a global R installation, try giving yourself write
permissions in /usr/lib/R/library, this might help. Otherwise, try
installing R from source in your home or elsewhere where you have all
write permissions and check it again.

Anyway, I wanted also to advertise my package because you use rimage:


The difference is - it supports up to 95 image formats and implements
many image processing methods. In fact you can combine this with
functions from rimage. If interested, go for a development version above
and it works on Fedora 6 Zod and 2.4.1 - did try just today.

Best regards,

More information about the R-help mailing list