我正在尝试在 linux 系统中安装 r 包“arules”。我使用的是 R 版本 3.2.2(32 位)。错误信息是这样的:
>install.packages("arules")
Installing package into ‘/home/mi/R/i686-pc-linux-gnu-library/3.2’
(as ‘lib’ is unspecified)
also installing the dependencies ‘lattice’, ‘Matrix’
trying URL 'https://dirichlet.mat.puc.cl/src/contrib/lattice_0.20-33.tar.gz'
Content type 'application/x-gzip' length 353706 bytes (345 KB)
==================================================
downloaded 345 KB
trying URL 'https://dirichlet.mat.puc.cl/src/contrib/Matrix_1.2-3.tar.gz'
Content type 'application/x-gzip' length 1784878 bytes (1.7 MB)
==========d========================================
downloaded 1.7 MB
trying URL 'https://dirichlet.mat.puc.cl/src/contrib/arules_1.3-1.tar.gz'
Content type 'application/x-gzip' length 1357643 bytes (1.3 MB)
==================================================
downloaded 1.3 MB
* installing *source* package ‘lattice’ ...
** package ‘lattice’ successfully unpacked and MD5 sums checked
** libs
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c init.c -o init.o
gcc: error: unrecognized command line option ‘-fstack-protector-strong’
make: *** [init.o] Error 1
ERROR: compilation failed for package ‘lattice’
* removing ‘/home/mi/R/i686-pc-linux-gnu-library/3.2/lattice’
ERROR: dependency ‘lattice’ is not available for package ‘Matrix’
* removing ‘/home/mi/R/i686-pc-linux-gnu-library/3.2/Matrix’
ERROR: dependency ‘Matrix’ is not available for package ‘arules’
* removing ‘/home/mi/R/i686-pc-linux-gnu-library/3.2/arules’
The downloaded source packages are in
‘/tmp/RtmpIejCpM/downloaded_packages’
Warning messages:
1: In install.packages("arules") :
installation of package ‘lattice’ had non-zero exit status
2: In install.packages("arules") :
installation of package ‘Matrix’ had non-zero exit status
3: In install.packages("arules") :
installation of package ‘arules’ had non-zero exit status
>
[3]+ Stopped R
mi@MI:~$ R --version
R version 3.2.2 (2015-08-14) -- "Fire Safety"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: i686-pc-linux-gnu (32-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
http://www.gnu.org/licenses/.
我不明白如何解决这个错误?这个版本或那个包不再可用?