gpt4 book ai didi

linux - 安装 mclust R 包

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:35:07 27 4
gpt4 key购买 nike

我在将 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

最佳答案

/usr/bin/ld: cannot find -llapack
/usr/bin/ld: cannot find -lblas

意味着你需要安装这样的库,比如:

$ sudo apt-get install liblapack-dev libblas-dev

或类似的东西(取决于您的 gnu/Linux 发行版)。

关于linux - 安装 mclust R 包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20590077/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com