我在将mclust安装到R中遇到一些问题,获取下面的消息,有什么想法?
install.packages("mclust")
Installing package into ‘/home/aleferna/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
trying URL 'http://www.laqee.unal.edu.co/CRAN/src/contrib/mclust_4.2.tar.gz'
Content type 'application/x-gzip' length 1602272 bytes (1.5 Mb)
opened URL
==================================================
downloaded 1.5 Mb
* installing *source* package ‘mclust’ ...
** package ‘mclust’ successfully unpacked and MD5 sums checked
** libs
gfortran -fpic -O3 -pipe -g -c mclust.f -o mclust.o
gcc -std=gnu99 -shared -o mclust.so mclust.o -llapack -lblas -lgfortran -lm -lquadmath -lgfortran -lm -lquadmath -L/usr/lib/R/lib -lR
/usr/bin/ld: cannot find -llapack
/usr/bin/ld: cannot find -lblas
collect2: error: ld returned 1 exit status
make: *** [mclust.so] Error 1
ERROR: compilation failed for package ‘mclust’
* removing ‘/home/aleferna/R/x86_64-pc-linux-gnu-library/3.0/mclust’
The downloaded source packages are in
‘/tmp/RtmpOPyKmZ/downloaded_packages’
Warning message:
In install.packages("mclust") :
installation of package ‘mclust’ had non-zero exit status
答案 0 :(得分:0)
/usr/bin/ld: cannot find -llapack
/usr/bin/ld: cannot find -lblas
意味着您需要安装此类库,例如:
$ sudo apt-get install liblapack-dev libblas-dev
或类似的东西(取决于您的gnu / Linux发行版)。