trouble with R installation under Linux

Posted on 2010-01-08
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 #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 and 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//':
  /usr/local/lib/R/modules// 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
        *. replace the with the other .so created by R, namely
    (why R creates two copies of the .so?)

None of those work.

Help please.
Question by:strider711
    LVL 5

    Accepted Solution

    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:

    > 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.

    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".

    Author Closing Comment

    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....

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    The purpose of this article is to demonstrate how we can use conditional statements using Python.
    Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    758 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

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now