R-2.15.0 opensuse install.packages安装kernlab报错,是因为缺少相应的编译器吗?

install.packages("kernlab")
trying URL 'http://mirrors.xmu.edu.cn/CRA...'

Content type 'application/x-gzip' length 1170281 bytes (1.1 MB)

opened URL

downloaded 1.1 MB

  • installing source package ‘kernlab’ ...
    ** package ‘kernlab’ successfully unpacked and MD5 sums checked

** libs
g++ -I/usr/local/lib64/R/include -DNDEBUG -I/usr/local/include -fPIC -c brweight.cpp -o brweight.o
make: g++: Command not found
/usr/local/lib64/R/etc/Makeconf:142: recipe for target 'brweight.o' failed
make: * [brweight.o] Error 127
ERROR: compilation failed for package ‘kernlab’

  • removing ‘/usr/local/lib64/R/library/kernlab’

The downloaded source packages are in

    ‘/tmp/RtmpqXmzBJ/downloaded_packages’

Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("kernlab") :
installation of package ‘kernlab’ had non-zero exit status

阅读 3.9k
1 个回答

建议你先升级到最新的 R 3.3,此外可能是你的Gcc依赖的问题,Gcc 可以安装5.0以上的版本(C++的一个编译器)