我遇到了R问题,我似乎无法弄清楚如何解决。错误在Mac OSX中从源代码安装R软件包 - “make”命令未找到
当试图从源代码安装的R包,我遇到了以下错误:
* installing *source* package ‘cthresh’ ... ** libs *** arch - i386 sh: make: command not found ERROR: compilation failed for package ‘cthresh’ * removing ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/cthresh’
,这将导致你以为我没有安装编译器,或者是$ PATH不组。这两个都不是真的。我已经安装了Xcode和回声$ PATH给我:
echo $PATH
/Library/Frameworks/Python.framework/Versions/Current/bin:/Library/Frameworks/Python.framework/Versions/Current/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/admn/bin:/usr/local/bin:/Users/admn/bin:/usr/local/bin:/Users/admn/bin:/usr/local/bin:/Developer-3.2.5/usr/bin:/Users/admn/bin:/usr/local/bin:/Developer-3.2.5/usr/bin
所以你可以看到,开发商在/ usr/bin中
我甚至被确信显示出来:
export PATH=${PATH}:/Developer-3.2.5/usr/bin
如果我称之为 '制作' 在bash或sh:
sh-3.2$ make make: * No targets specified and no makefile found. Stop.
bash-3.2$ make make: * No targets specified and no makefile found. Stop.
的编译器有:
bash-3.2$ gcc i686-apple-darwin10-gcc-4.2.1: no input files
bash-3.2$ g++ i686-apple-darwin10-g++-4.2.1: no input files
那么是什么给?为什么R不能'制造'?我真的在这个损失,似乎无法找到答案的任何地方!我的猜测是R不是在寻找合适的编译器或其他东西,但我无法弄清楚如何检查它在寻找的位置以及为什么它在'make'上失败
我在OSX Lion的MacBook Pro上。请帮忙!
---编辑----
好的我在这个问题上取得了一些进展。尽管我已经加入
PATH = $ {PATH}:/开发-3.2.5的/ usr/bin中
我的bash/sh的.profile文件,我需要将其添加到.Renviron文件中。我发现,文件中:/Library/Frameworks/R.framework/Versions/2.15/Resources/etc/
但现在我得到这个错误:
- installing source package ‘cthresh’ ... ** libs * arch - i386 make: * No rule to make target
._cthreb.o', needed by
cthresh.so'. Stop. ERROR: compilation failed for package ‘cthresh’
这让我觉得有可能是额外的东西添加到这个.Renviron文件?任何想法是什么?
好的我在这个问题上取得了一些进展。即使我已将PATH = $ {PATH}:/ Developer-3.2.5/usr/bin添加到我的bash/sh .profile中,我需要将其添加到.Renviron文件。我发现该文件在:/Library/Frameworks/R.framework/Versions/2.15/Resources/etc/ –
R的MAC常见问题可能有一些很好的提示,特别是第2节.http://cran.r-project.org /bin/macosx/RMacOSX-FAQ.html –
将其发送到r-sig-mac邮件列表。他们会指示您常常设置Lion来编译R软件包。 –