我修改了phmm
包中的C函数。现在我想重建包,但发生以下错误。我该如何修复错误?
$ cd ~/Desktop/phmmw
$ R CMD build phmm
* checking for file ‘phmm/DESCRIPTION’ ... OK
* preparing ‘phmm’:
* checking DESCRIPTION meta-information ... OK
* cleaning src
* installing the package to re-build vignettes
-----------------------------------
* installing *source* package ‘phmm’ ...
** libs
*** arch - x86_64
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -I/usr/local/include -fPIC -g -O2 -c arms.c -o arms.o
make: gcc-4.2: No such file or directory
make: *** [arms.o] Error 1
ERROR: compilation failed for package ‘phmm’
* removing ‘/private/var/folders/r0/9qv15p6j59j6jtfq775k6j380000gn/T/RtmpIPgvDE/Rinst48317ea7/phmm’
-----------------------------------
ERROR: package installation failed
答案 0 :(得分:1)
您的R安装配置了gcc
,这样(次优)是gcc-4.2
命令是硬连线的。
所以你需要
提供命令gcc-4.2
,通常通过gcc
到gcc-4.2
的符号链接完成,
或更改R设置,可能位于您需要查找$RHOME/etc/Makeconf
CC
中
或通过CC=gcc R CMD build phmm
您可能需要修改多个CC
设置,可能需要CXX
,LD
等。它可能像始终删除-4.2
部分一样简单。