Skip to content

Installing quantreg package under Ubuntu

4 messages · Frank E Harrell Jr, Ben Bolker, William Dunlap

#
Does any have installation instructions for this?  When I run 
install.packages('quantreg') I get:

gcc -std=gnu99 -shared -o quantreg.so akj.o boot.o brute.o chlfct.o 
cholesky.o combos.o crq.o crqfnb.o dsel05.o etime.o extract.o idmin.o 
iswap.o kuantile.o mcmb.o penalty.o powell.o rls.o rq0.o rq1.o rqbr.o 
rqfn.o rqfnb.o rqfnc.o sparskit2.o srqfn.o srqfnc.o srtpai.o -llapack 
-lblas -lgfortran -lm -lgfortran -lm -L/usr/lib/R/lib -lR
/usr/bin/ld: cannot find -llapack


 > sessionInfo()
R version 2.9.0 (2009-04-17)
i486-pc-linux-gnu

locale:
LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

loaded via a namespace (and not attached):
[1] tcltk_2.9.0 tools_2.9.0


Thanks
Frank
1 day later
#
Frank E Harrell Jr wrote:
http://wiki.r-project.org/rwiki/doku.php?id=getting-started:installation:debian

suggests

(sudo) apt-get install r-base-dev

or perhaps

sudo apt-get build-dep r-base

also see

http://cran.r-project.org/bin/linux/ubuntu/

for instructions on access to more up-to-date
repositories, the most salient of which are:
====================
add

   deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu jaunty/

(or hardy, intrepid, etc.) to /etc/apt/sources.list

The Ubuntu archives on CRAN are signed with the key of "Vincent Goulet
<vincent.goulet at act.ulaval.ca>" with key ID E2A11821. You can fetch this key
with

   gpg --keyserver subkeys.pgp.net --recv-key E2A11821

and then feed it to apt-key with

   gpg -a --export E2A11821 | sudo apt-key add -
#
Ben Bolker wrote:
Ben,

Installing r-base-dev was the key.  Thanks!  Now 
install.packages('quantreg') works perfectly.

Frank

  
    
#
There are some gotchas buried in the Depends: line for
R-base-core, which all the other R-base* packages depend
upon.  It says it depends on lapack or atlas but installing
libatlas-base-dev does not make a /usr/lib/liblapack.so so
sequence
   aptitude install libatlas-base-dev
   aptitude install r-base-dev
(on a freshly installed Ubuntu) results in Frank's problem 
(fire up R and install.packages("quantreg")
fails because the linker cannot resolve -llapack.
Purging atlas package and reinstalling r-base-dev fixes
things so the desired /usr/lib/lliblapack.so is used.

Bill Dunlap
TIBCO Software Inc - Spotfire Division
wdunlap tibco.com