Problems with updating R-packages

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems with updating R-packages

Petar Milin

Dear Helpers,
I am new in Linux and R, trying to update packages I need in my work,
but repeatedly I failed for reasons I do not understand.
First, I use:
> update.packages()
Then, I choose nearest mirror and accept update of 'Design' package:
> Design :
> Version 2.0-9 installed in /usr/lib/R/site-library
> Version 2.0-12 available at http://cran.r-mirror.de
> Update (y/N/c)?  y
Finally, after successful download, installation starts and fails:

> trying URL 'http://cran.r-mirror.de/src/contrib/Design_2.0-12.tar.gz'
> Content type 'application/x-gzip' length 329401 bytes
> opened URL
> ==================================================
> downloaded 321Kb
>
> * Installing *source* package 'Design' ...
> ** libs
> g77   -fPIC  -g -O2 -c lrmfit.f -o lrmfit.o
> g77   -fPIC  -g -O2 -c mlmats.f -o mlmats.o
> g77   -fPIC  -g -O2 -c robcovf.f -o robcovf.o
> gcc -shared  -o Design.so lrmfit.o mlmats.o robcovf.o  -lg2c -lm
-lgcc_s -L/usr/lib/R/lib -lR

> /usr/bin/ld: crti.o: No such file: No such file or directory
> collect2: ld returned 1 exit status
> make: *** [Design.so] Error 1
> ERROR: compilation failed for package 'Design'
> ** Removing '/usr/lib/R/site-library/Design'
> ** Restoring previous '/usr/lib/R/site-library/Design'
>
> The downloaded packages are in
>         /tmp/RtmphbLWxZ/downloaded_packages
> Warning message:
> installation of package 'Design' had non-zero exit status in:
install.packages(update[, "Package"], instlib, contriburl = contriburl,

I am using following R under Ubuntu - Linux:
 platform = "i386-pc-linux-gnu"
 arch = "i386"
 os = "linux-gnu"
 system = "i386, linux-gnu"
 major = "2"
 minor = "2.1"
 year = "2005"
 month = "12"
 day = "20"
 "svn rev" = "36812"
 language = "R"

I would be really thankful if anyone could give me explanation of what I
am doing wrong and how can I make update.

Sincerely,
Petar Milin
Assistant Professor
Department of Psychology
University of Novi Sad
Serbia and Montenegro

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: Problems with updating R-packages

Jonathan Baron
You may need to install glibc-devel or glibc-dev, depending on
how Ubuntu works and depending on how you installed it.  (For
Fedora, these are called "devel".)  You may be missing a great
many "devel" rpms, such as readline-devel, blas-devel, and so on,
which you will need for other packages.

I'm not sure how you are supposed to know this, if it is true,
although you must of course start by looking at the error message
itself, which tells you that the problem is not finding crti.o.

Appendix C1 of the installation and administration guide does
mention the need for "dev(el)," but does not mention glibc in
particular.

When these things happen to me, I search for the missing file, in
this case crti.o, on Google or on some repository of rpms, such
as http://rpm.pbone.net.  In this case, there is a lot of
discussion on Google about the very error message you got,
although it is probabaly all misleading.

You can also see whether you actually have the file somewhere by
saying

slocate crti.o

If you find it, you can discover which rpm it is part of by using
its full path, e.g.,

rpm -qf /usr/lib/crti.o

Jon

On 12/31/05 12:27, Petar Milin wrote:

>
> Dear Helpers,
> I am new in Linux and R, trying to update packages I need in my work,
> but repeatedly I failed for reasons I do not understand.
> First, I use:
> > update.packages()
> Then, I choose nearest mirror and accept update of 'Design' package:
> > Design :
> > Version 2.0-9 installed in /usr/lib/R/site-library
> > Version 2.0-12 available at http://cran.r-mirror.de
> > Update (y/N/c)?  y
> Finally, after successful download, installation starts and fails:
> > trying URL 'http://cran.r-mirror.de/src/contrib/Design_2.0-12.tar.gz'
> > Content type 'application/x-gzip' length 329401 bytes
> > opened URL
> > ==================================================
> > downloaded 321Kb
> >
> > * Installing *source* package 'Design' ...
> > ** libs
> > g77   -fPIC  -g -O2 -c lrmfit.f -o lrmfit.o
> > g77   -fPIC  -g -O2 -c mlmats.f -o mlmats.o
> > g77   -fPIC  -g -O2 -c robcovf.f -o robcovf.o
> > gcc -shared  -o Design.so lrmfit.o mlmats.o robcovf.o  -lg2c -lm
> -lgcc_s -L/usr/lib/R/lib -lR
> > /usr/bin/ld: crti.o: No such file: No such file or directory
> > collect2: ld returned 1 exit status
> > make: *** [Design.so] Error 1
> > ERROR: compilation failed for package 'Design'
> > ** Removing '/usr/lib/R/site-library/Design'
> > ** Restoring previous '/usr/lib/R/site-library/Design'
> >
> > The downloaded packages are in
> >         /tmp/RtmphbLWxZ/downloaded_packages
> > Warning message:
> > installation of package 'Design' had non-zero exit status in:
> install.packages(update[, "Package"], instlib, contriburl = contriburl,
>
> I am using following R under Ubuntu - Linux:
>  platform = "i386-pc-linux-gnu"
>  arch = "i386"
>  os = "linux-gnu"
>  system = "i386, linux-gnu"
>  major = "2"
>  minor = "2.1"
>  year = "2005"
>  month = "12"
>  day = "20"
>  "svn rev" = "36812"
>  language = "R"
>
> I would be really thankful if anyone could give me explanation of what I
> am doing wrong and how can I make update.
>
> Sincerely,
> Petar Milin
> Assistant Professor
> Department of Psychology
> University of Novi Sad
> Serbia and Montenegro
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

--
Jonathan Baron, Professor of Psychology, University of Pennsylvania
Home page: http://www.sas.upenn.edu/~baron

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: Problems with updating R-packages

Dirk Eddelbuettel
In reply to this post by Petar Milin

On 31 December 2005 at 12:27, Petar Milin wrote:
| I am new in Linux and R, trying to update packages I need in my work,
| but repeatedly I failed for reasons I do not understand.
| First, I use:
| > update.packages()
| Then, I choose nearest mirror and accept update of 'Design' package:
| > Design :
| > Version 2.0-9 installed in /usr/lib/R/site-library
| > Version 2.0-12 available at http://cran.r-mirror.de
[...]
| > gcc -shared  -o Design.so lrmfit.o mlmats.o robcovf.o  -lg2c -lm
| -lgcc_s -L/usr/lib/R/lib -lR
| > /usr/bin/ld: crti.o: No such file: No such file or directory
[...]

| I am using following R under Ubuntu - Linux:
|  platform = "i386-pc-linux-gnu"
|  arch = "i386"
|  os = "linux-gnu"
|  system = "i386, linux-gnu"
|  major = "2"
|  minor = "2.1"
[...]

So did you manage to compile R 2.2.1, but you cannot compile R packages?
Interesting.

| I would be really thankful if anyone could give me explanation of what I
| am doing wrong and how can I make update.

Well, you did get a _very_ specific error message of crti.o missing. So let's
look for crti.o:

edd@joe:~$ locate crti.o
/usr/lib/crti.o
edd@joe:~$        

and then figure out where that package belongs:

edd@joe:~$ dpkg -S `locate crti.o`
libc6-dev: /usr/lib/crti.o

So Jon Baron was spot-on:  libc6-dev is what you need.  

Now, a useful search page for Debian is at
        http://www.debian.org/distrib/packages 
where the search at the bottom allows you to search all Debian package
listings -- that would allow you to identify crti.o as part of libc6-dev
given that it cannot be found by the locate command on your machine.

Lastly, and as an aside, Ubuntu does rebuilds of the packages we maintain for
Debian. Running 'apt-cache policy r-cran-design' shows 2.0.11 being available
for Ubuntu breezy. Debian itself has 2.0.12 in testing and unstable. So this
particular one you could also install as a package.



--
Hell, there are no rules here - we're trying to accomplish something.
                                                  -- Thomas A. Edison

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: Problems with updating R-packages

Martin Maechler
In reply to this post by Jonathan Baron
>>>>> "Jon" == Jonathan Baron <[hidden email]>
>>>>>     on Sat, 31 Dec 2005 08:08:49 -0500 writes:

    Jon> You may need to install glibc-devel or glibc-dev,
    Jon> depending on how Ubuntu works and depending on how you
    Jon> installed it.  (For Fedora, these are called "devel".)
    Jon> You may be missing a great many "devel" rpms, such as
    Jon> readline-devel, blas-devel, and so on, which you will
    Jon> need for other packages.

    Jon> I'm not sure how you are supposed to know this, if it
    Jon> is true, although you must of course start by looking
    Jon> at the error message itself, which tells you that the
    Jon> problem is not finding crti.o.

    Jon> Appendix C1 of the installation and administration
    Jon> guide does mention the need for "dev(el)," but does not
    Jon> mention glibc in particular.

    Jon> When these things happen to me, I search for the
    Jon> missing file, in this case crti.o, on Google or on some
    Jon> repository of rpms, such as http://rpm.pbone.net.  In
    Jon> this case, there is a lot of discussion on Google about
    Jon> the very error message you got, although it is
    Jon> probabaly all misleading.

    Jon> You can also see whether you actually have the file
    Jon> somewhere by saying

    Jon> slocate crti.o

    Jon> If you find it, you can discover which rpm it is part
    Jon> of by using its full path, e.g.,

    Jon> rpm -qf /usr/lib/crti.o

In Ubuntu (which is a Debian derivative), I directly search for
the file in the installed (debian) packages by

   dpkg -S crti.o

which returns

      libc6-dev: /usr/lib/crti.o

So with ubuntu/debian, you need the libc6-dev package, which you
install by e.g.,

        apt-get install libc6-dev

Martin

    Jon> On 12/31/05 12:27, Petar Milin wrote:
    >>  Dear Helpers, I am new in Linux and R, trying to update
    >> packages I need in my work, but repeatedly I failed for
    >> reasons I do not understand.  First, I use: >
    >> update.packages() Then, I choose nearest mirror and
    >> accept update of 'Design' package: > Design : > Version
    >> 2.0-9 installed in /usr/lib/R/site-library > Version
    >> 2.0-12 available at http://cran.r-mirror.de > Update
    >> (y/N/c)?  y Finally, after successful download,
    >> installation starts and fails: > trying URL
    >> 'http://cran.r-mirror.de/src/contrib/Design_2.0-12.tar.gz'
    >> > Content type 'application/x-gzip' length 329401 bytes >
    >> opened URL >
    >> ================================================== >
    >> downloaded 321Kb
    >> >
    >> > * Installing *source* package 'Design' ...  > ** libs >
    >> g77 -fPIC -g -O2 -c lrmfit.f -o lrmfit.o > g77 -fPIC -g
    >> -O2 -c mlmats.f -o mlmats.o > g77 -fPIC -g -O2 -c
    >> robcovf.f -o robcovf.o > gcc -shared -o Design.so
    >> lrmfit.o mlmats.o robcovf.o -lg2c -lm -lgcc_s
    >> -L/usr/lib/R/lib -lR > /usr/bin/ld: crti.o: No such file:
    >> No such file or directory > collect2: ld returned 1 exit
    >> status > make: *** [Design.so] Error 1 > ERROR:
    >> compilation failed for package 'Design' > ** Removing
    >> '/usr/lib/R/site-library/Design' > ** Restoring previous
    >> '/usr/lib/R/site-library/Design'
    >> >
    >> > The downloaded packages are in >
    >> /tmp/RtmphbLWxZ/downloaded_packages > Warning message: >
    >> installation of package 'Design' had non-zero exit status
    >> in: install.packages(update[, "Package"], instlib,
    >> contriburl = contriburl,
    >>
    >> I am using following R under Ubuntu - Linux: platform =
    >> "i386-pc-linux-gnu" arch = "i386" os = "linux-gnu" system
    >> = "i386, linux-gnu" major = "2" minor = "2.1" year =
    >> "2005" month = "12" day = "20" "svn rev" = "36812"
    >> language = "R"
    >>
    >> I would be really thankful if anyone could give me
    >> explanation of what I am doing wrong and how can I make
    >> update.
    >>
    >> Sincerely, Petar Milin Assistant Professor Department of
    >> Psychology University of Novi Sad Serbia and Montenegro
    >>
    >> ______________________________________________
    >> [hidden email] mailing list
    >> https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do
    >> read the posting guide!
    >> http://www.R-project.org/posting-guide.html

    Jon> -- Jonathan Baron, Professor of Psychology, University
    Jon> of Pennsylvania Home page:
    Jon> http://www.sas.upenn.edu/~baron

    Jon> ______________________________________________
    Jon> [hidden email] mailing list
    Jon> https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do
    Jon> read the posting guide!
    Jon> http://www.R-project.org/posting-guide.html

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: Problems with updating R-packages

Petar Milin
In reply to this post by Petar Milin
Thanks to the detailed help with previous error message, I managed to
update Design package. However, when I tried to update Matrix and lme4 I
received an error message again:
...
> /usr/bin/ld: cannot find -lblas-3
> collect2: ld returned 1 exit status
> make: *** [Matrix.so] Error 1
> ERROR: compilation failed for package 'Matrix'
> ** Removing '/usr/lib/R/site-library/Matrix'
> ** Restoring previous '/usr/lib/R/site-library/Matrix'
...

When I tried to search for lblas-3, following instruction of professor
Jonathan Baron, Dirk Eddelbuettel and Martin Maechler, I could not find
it.
With:
> dpkg -S lblas-3
and
> dpkg -S *-lblas-3*
I received:
> dpkg: *-lblas-3* not found.

Without Matrix, it is not possible to have lme4 updated. Also, I would
like to have nlme and some other packages. The question is how should I
procees and not be tedious with questions to the Mailing list?

>>>>> "Jon" == Jonathan Baron <[hidden email]>
>>>>>     on Sat, 31 Dec 2005 08:08:49 -0500 writes:

    Jon> You may need to install glibc-devel or glibc-dev,
    Jon> depending on how Ubuntu works and depending on how you
    Jon> installed it.  (For Fedora, these are called "devel".)
    Jon> You may be missing a great many "devel" rpms, such as
    Jon> readline-devel, blas-devel, and so on, which you will
    Jon> need for other packages.

    Jon> I'm not sure how you are supposed to know this, if it
    Jon> is true, although you must of course start by looking
    Jon> at the error message itself, which tells you that the
    Jon> problem is not finding crti.o.

    Jon> Appendix C1 of the installation and administration
    Jon> guide does mention the need for "dev(el)," but does not
    Jon> mention glibc in particular.

    Jon> When these things happen to me, I search for the
    Jon> missing file, in this case crti.o, on Google or on some
    Jon> repository of rpms, such as http://rpm.pbone.net.  In
    Jon> this case, there is a lot of discussion on Google about
    Jon> the very error message you got, although it is
    Jon> probabaly all misleading.

    Jon> You can also see whether you actually have the file
    Jon> somewhere by saying

    Jon> slocate crti.o

    Jon> If you find it, you can discover which rpm it is part
    Jon> of by using its full path, e.g.,

    Jon> rpm -qf /usr/lib/crti.o

In Ubuntu (which is a Debian derivative), I directly search for
the file in the installed (debian) packages by

   dpkg -S crti.o

which returns

      libc6-dev: /usr/lib/crti.o

So with ubuntu/debian, you need the libc6-dev package, which you
install by e.g.,

        apt-get install libc6-dev

Martin

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: Problems with updating R-packages

Dirk Eddelbuettel

On 2 January 2006 at 21:56, Petar Milin wrote:
| Thanks to the detailed help with previous error message, I managed to
| update Design package. However, when I tried to update Matrix and lme4 I
| received an error message again:
| ...
| > /usr/bin/ld: cannot find -lblas-3
| > collect2: ld returned 1 exit status
| > make: *** [Matrix.so] Error 1
| > ERROR: compilation failed for package 'Matrix'
| > ** Removing '/usr/lib/R/site-library/Matrix'
| > ** Restoring previous '/usr/lib/R/site-library/Matrix'
| ...
|
| When I tried to search for lblas-3, following instruction of professor
| Jonathan Baron, Dirk Eddelbuettel and Martin Maechler, I could not find
| it.
| With:
| > dpkg -S lblas-3
| and
| > dpkg -S *-lblas-3*
| I received:
| > dpkg: *-lblas-3* not found.
|
| Without Matrix, it is not possible to have lme4 updated. Also, I would
| like to have nlme and some other packages. The question is how should I
| procees and not be tedious with questions to the Mailing list?

You could start on the r-sig-debian mailing list where we could have told you
that _all_ of these packages are available as native Debian (and hence native
Ubuntu) packages.  So get in the habit of doing 'apt-cache search $foo' for
various values of $foo -- there may be more than you think.  

Now, for your questions, the *blas-3 libs are tricky as they are 'virtual' --
actual libraries are provided by a variety of packages, including the
(non-optimised) reference blas and the various (optmised) atlas libraries of
which base, as well as one matching your cpu, are suitable.

You never told us if you installed r-base-dev which via it Depends: line
tries to ensure you have one of the *blas-3 libraries installed:

Source: r-base
Version: 2.2.1-1
Depends: r-base-core (= 2.2.1-1), refblas3-dev | atlas3-base-dev |
  libblas-3.so,  ....

Hth, Dirk

--
Hell, there are no rules here - we're trying to accomplish something.
                                                  -- Thomas A. Edison

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: Problems with updating R-packages

Jonathan Baron
In reply to this post by Petar Milin
On 01/02/06 21:56, Petar Milin wrote:

> Thanks to the detailed help with previous error message, I managed to
> update Design package. However, when I tried to update Matrix and lme4 I
> received an error message again:
> ...
> > /usr/bin/ld: cannot find -lblas-3
> > collect2: ld returned 1 exit status
> > make: *** [Matrix.so] Error 1
> > ERROR: compilation failed for package 'Matrix'
> > ** Removing '/usr/lib/R/site-library/Matrix'
> > ** Restoring previous '/usr/lib/R/site-library/Matrix'
> ...
>
> When I tried to search for lblas-3, following instruction of professor
> Jonathan Baron, Dirk Eddelbuettel and Martin Maechler, I could not find
> it.
> With:
> > dpkg -S lblas-3
> and
> > dpkg -S *-lblas-3*
> I received:
> > dpkg: *-lblas-3* not found.

Well, the other thing you can try, which I should have mentioned,
is RSiteSearch("cannot find lblas-3"), or something like that, or
go to http://finzi.psych.upenn.edu.

Apparently you aren't the only one to have this particular
problem, and the way to a solution is given in several replies to
earlier messages in this list.  I cannot understand them because
they are all specific to Debian.  Do you have blas installed?  (I
can't believe you got very far without it, though.)

Jon
--
Jonathan Baron, Professor of Psychology, University of Pennsylvania
Home page: http://www.sas.upenn.edu/~baron

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html