![](/img/trans.png)
[英]/usr/bin/ld: cannot find -lgfortran when installing 'RcppArmadillo' in R
[英]digest package not installing in R - lgfortran not found
我正在尝试在 R 中安装摘要 package。 但是安装失败,显然是因为编译器无法识别-lgfortran
标志。 我一直找不到这方面的任何信息。 任何帮助表示赞赏。
> install.packages('digest', repos='http://cran.us.r-project.org')
trying URL 'http://cran.us.r-project.org/src/contrib/digest_0.6.12.tar.gz'
Content type 'application/x-gzip' length 120337 bytes (117 KB)
==================================================
downloaded 117 KB
* installing *source* package ‘digest’ ...
** package ‘digest’ successfully unpacked and MD5 sums checked
** libs
gcc -std=gnu99 -I/home/alexander/anaconda3/lib/R/include -DNDEBUG -I/home/alexander/anaconda3/include -fpic -I/home/alexander/anaconda3/include -c aes.c -o aes.o
gcc -std=gnu99 -I/home/alexander/anaconda3/lib/R/include -DNDEBUG -I/home/alexander/anaconda3/include -fpic -I/home/alexander/anaconda3/include -c crc32.c -o crc32.o
gcc -std=gnu99 -I/home/alexander/anaconda3/lib/R/include -DNDEBUG -I/home/alexander/anaconda3/include -fpic -I/home/alexander/anaconda3/include -c digest.c -o digest.o
gcc -std=gnu99 -I/home/alexander/anaconda3/lib/R/include -DNDEBUG -I/home/alexander/anaconda3/include -fpic -I/home/alexander/anaconda3/include -c init.c -o init.o
gcc -std=gnu99 -I/home/alexander/anaconda3/lib/R/include -DNDEBUG -I/home/alexander/anaconda3/include -fpic -I/home/alexander/anaconda3/include -c md5.c -o md5.o
gcc -std=gnu99 -I/home/alexander/anaconda3/lib/R/include -DNDEBUG -I/home/alexander/anaconda3/include -fpic -I/home/alexander/anaconda3/include -c pmurhash.c -o pmurhash.o
gcc -std=gnu99 -I/home/alexander/anaconda3/lib/R/include -DNDEBUG -I/home/alexander/anaconda3/include -fpic -I/home/alexander/anaconda3/include -c raes.c -o raes.o
gcc -std=gnu99 -I/home/alexander/anaconda3/lib/R/include -DNDEBUG -I/home/alexander/anaconda3/include -fpic -I/home/alexander/anaconda3/include -c sha1.c -o sha1.o
gcc -std=gnu99 -I/home/alexander/anaconda3/lib/R/include -DNDEBUG -I/home/alexander/anaconda3/include -fpic -I/home/alexander/anaconda3/include -c sha2.c -o sha2.o
gcc -std=gnu99 -I/home/alexander/anaconda3/lib/R/include -DNDEBUG -I/home/alexander/anaconda3/include -fpic -I/home/alexander/anaconda3/include -c sha256.c -o sha256.o
gcc -std=gnu99 -I/home/alexander/anaconda3/lib/R/include -DNDEBUG -I/home/alexander/anaconda3/include -fpic -I/home/alexander/anaconda3/include -c xxhash.c -o xxhash.o
gcc -std=gnu99 -shared -L/home/alexander/anaconda3/lib/R/lib -L/home/alexander/anaconda3/lib -lgfortran -o digest.so aes.o crc32.o digest.o init.o md5.o pmurhash.o raes.o sha1.o sha2.o sha256.o xxhash.o -L/home/alexander/anaconda3/lib/R/lib -lR
/usr/bin/ld: cannot find -lgfortran
collect2: error: ld returned 1 exit status
/home/alexander/anaconda3/lib/R/share/make/shlib.mk:6: recipe for target 'digest.so' failed
make: *** [digest.so] Error 1
ERROR: compilation failed for package ‘digest’
* removing ‘/home/alexander/anaconda3/lib/R/library/digest’
* restoring previous ‘/home/alexander/anaconda3/lib/R/library/digest’
FC = usr/local/opt/gcc/bin/gfortran
F77 = /usr/local/opt/gcc/bin/gfortran
FLIBS = -L/usr/local/opt/gcc/lib
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.