开发者

Installing knncat

I am using R in Ubuntu 10.04.

I need to understand the documentation. Installing knncat I get this error message:

gcc -I/usr/share/R/include     -I . -DUSE_R_ALLOC -DCALL_FROM_R -fpic 
-std=gnu99 -O3 -pipe  -g -c ranlib.c -o ranlib.o gcc -I/usr/share/R/include     -I . -DUSE_R_ALLOC -DCALL_FROM_R -fpic  -std=gnu99 -O3 -pipe  -g -c utilsR.c -o utilsR.o gcc -shared -o knncat.so com.o dodisc.o donn.o donnwrap.o dsort.o linpack.o matrix.o
objective.o ords.o ranlib.o utilsR.o -llapack -lblas -lgfortran -lm
-L/usr/lib/R/lib -lR /usr/bin/ld: cannot find -llapack collect2: ld returned 1 exit status make: *** [knncat.so] Error 1 ERROR:
compilation failed for package ‘knncat’

In the documentation I find this recomendation:

Provision is made for using an external LAPACK library, principally to 
cope with BLAS libraries which contain a copy of LAPACK (such as s开发者_StackOverflow社区unperf 
on Solaris, vecLib on OS X and ACML on ‘ix86’/‘x86_64’ Linux)

If it is mandatory (?), I should use this code:

--with-lapack="-L/path/to/libs -llapack -lcblas"

But where? I am using the standard installation of packages in R.

install.packages('knncat')

I am not sure of:

  • Is it mandatory to install lapack? I do have BLAS + LAPACK.
  • How to install a package without using install.packages()?
  • which are the choices I have now?


Please install the r-base-dev package, which will take care of the -dev packages for LAPACK and BLAS as well.


It was an old version of R. Even when I did upgrade, it does not fixed. I followed this orders: from http://ubuntuforums.org/showthread.php?t=377323

sudo aptitude install r-base r-recommended

In R

install.packages('knncat')

Now it is working!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜