简体   繁体   中英

R package installation error (on Fedora 20)

I am trying to install the tm package in R but this depends on a package slam which I am having trouble installing. The error attached below cannot find -lRblas. What do I need to install on my distro so that I get this library?

Error Message

  install.packages("slam") Installing package into '/home/eroche/R/x86_64-redhat-linux-gnu-library/3.1' (as 'lib' is unspecified) trying URL 'http://cran.rstudio.com/src/contrib/slam_0.1-32.tar.gz' Content type 'application/x-gzip' length 46672 bytes (45 Kb) opened URL ================================================== downloaded 45 Kb * installing *source* package 'slam' ... ** package 'slam' successfully unpacked and MD5 sums checked ** libs gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c apply.c -o apply.o gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c grouped.c -o grouped.o gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c sparse.c -o sparse.o gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c util.c -o util.o gcc -m64 -std=gnu99 -shared -Wl,-z,relro -o slam.so apply.o grouped.o sparse.o util.o -L/usr/lib64/R/lib -lRblas -lgfortran -lm -lquadmath -L/usr/lib64/R/lib -lR /usr/bin/ld: cannot find -lRblas collect2: error: ld returned 1 exit status make: *** [slam.so] Error 1 ERROR: compilation failed for package 'slam' * removing '/home/eroche/R/x86_64-redhat-linux-gnu-library/3.1/slam' Warning in install.packages : installation of package 'slam' had non-zero exit status The downloaded source packages are in '/tmp/RtmpGsb0e4/downloaded_packages' > sessionInfo() R version 3.1.1 (2014-07-10) Platform: x86_64-redhat-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_IE.UTF-8 LC_NUMERIC=C LC_TIME=en_IE.UTF-8 LC_COLLATE=en_IE.UTF-8 LC_MONETARY=en_IE.UTF-8 [6] LC_MESSAGES=en_IE.UTF-8 LC_PAPER=en_IE.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_IE.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] tools_3.1.1 

Please try to install BLAS math libraries with following command.

yum install blas-devel

Then you should try to reinstall slam.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM