簡體   English   中英

摘要 package 未安裝在 R - lgfortran 未找到

[英]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’
  1. 使用自制軟件安裝 gcc, gfortrain
  2. 創建文件夾 /Users/YOURNAME/.R
  3. 創建文本文件 /Users/YOURNAME/.R/Makevars
  4. 將其放入該文件中:

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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM