?
Solved

trouble with R installation under Linux

Posted on 2010-01-08
2
Medium Priority
?
541 Views
Last Modified: 2013-12-06
I sent the following message to R-dev and R-help but not get an answer...

I need your help to make R works on my linux box, runing fedora 11.

Few things on the machine and steps I did:

1. uname -a shows:
  Linux bagvapp 2.6.29.4-167.fc11.i586 #1 SMP Wed May 27 17:14:37 EDT 2009 i686 athlon i386 GNU/Linux

2. it has a gcc (version 4.4) RedHat's build

3. the g77 comes with the box does not work (R's configure tells it could not compile simple fortran code); so I download and install a binary version of gfortran (version 4.5) and set the LD_LIBRARY_PATH.

4. download R-2.10.1; ./configure --with-readline=no --with-x=no
   (i.e., I did not use --with-blas or --with-lapack as the manuals indicated; the box does have its copy of blas.so and lapack.so under /usr/lib)

5. my test of lapack in R is to run: library(nlme); and then run the example from this package:
     fm1 <- nlme(height ~ SSasymp(age, Asym, R0, lrc),
                 data = Loblolly,
                 fixed = Asym + R0 + lrc ~ 1,
                 random = Asym ~ 1,
                 start = c(Asym = 103, R0 = -8.5, lrc = -3.3))

6. here is the error:

+ + + + Error in chol.default((value + t(value))/2) :
  lapack routines cannot be loaded
In addition: Warning message:
In chol.default((value + t(value))/2) :
  unable to load shared library '/usr/local/lib/R/modules//lapack.so':
  /usr/local/lib/R/modules//lapack.so: cannot restore segment prot after reloc: Permission denied

Other things I tried:
        *. remove the -O2 flag while compiling lapack
        *. "ln -s" this linux box's copy of lapack.so
        *. replace the lapack.so with the other .so created by R, namely
             libRlapack.so (why R creates two copies of the .so?)

None of those work.

Help please.
0
Comment
Question by:strider711
2 Comments
 
LVL 5

Accepted Solution

by:
dcesari earned 2000 total points
ID: 26293344
Just a few questions:
have you a good reason to build R by yourself? Fedora provides precompiled packages for R; the same for gfortran, you had better install it form Fedora rpm (it is called gcc-gfortran) rather than from a generic binary package.

If anyway you would like to compile R by yourself:

1.
> the g77 comes with the box does not work (R's configure tells it could not compile simple fortran code)
this configure message does not necessarily mean that g77 does not work, please check the file config.log to see more in detail why the compilation test made by configure has failed.

2.
Are you sure you do not need the --with-blas --with-lapack options in R? I think their meaning is "look for blas/lapack libraries installed in your system and use them", rather than "build a local copy of blas/lapack because they are not installed elsewhere in the system".
0
 

Author Closing Comment

by:strider711
ID: 31676266
works!
1. removed my "binary gfortran"
2. used yum install gcc-gfortran

then everything is fine.

The reason I did not use pre-build R is I am not able to install the perl(File::Copy) although I updated perl....
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

New style of hardware planning for Microsoft Exchange server.
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month14 days, 1 hour left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question