我正在尝试使用以下命令在Ubuntu中安装R软件包:
R CMD INSTALL rpart_4.1-5.tar.gz
install.packages("/home/rpart_4.1-5.tar.gz", repos = NULL, type="source")
* installing to library '/R/library'
* installing *source* package 'rpart' ...
** package 'rpart' successfully unpacked and MD5 sums checked
** libs
sh: make: command not found
ERROR: compilation failed for package 'rpart'
* removing '/R/library/rpart'
我已经安装了GCC 4.8.2,命令gcc -v提供以下输出:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/tools/stow/gcc-4_8_2-2.x86- 64.linux.centos.5/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.8.2/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.8.2/configure --prefix=/mnt/gcc/buildir/gcc-4.8.2
Thread model: posix
gcc version 4.8.2 (GCC)
上次我遇到相同的问题时,安装GCC(相同版本)解决了该问题(在有关此主题的Stackoverflow上发布了类似的查询).但是,这次它不起作用.有人可以让我知道造成此问题的原因.
谢谢
更新:
我们正在尝试手动安装依赖项,以查看其是否有效.我们已经安装了Make和GCC 4.8.2:
但是,我仍然收到以下错误:
* installing to library '/opt/vertica/R/library'
* installing *source* package 'rpart' ...
** package 'rpart' successfully unpacked and MD5 sums checked
** libs
cc -std=gnu99 -I/opt/vertica/R/include -DNDEBUG -I/usr/local/include -fpic -c anova.c -o anova.o
make: cc: Command not found
make: *** [anova.o] Error 127
ERROR: compilation failed for package 'rpart'
* removing '/opt/vertica/R/library/rpart'
除了Make和GCC之外,还有其他需要安装的依赖项吗?
解决方法:
您的系统没有用于编译的make实用程序.
请执行以下命令以在您的系统中安装make.
sudo apt-get install build-essential
标签:gcc,linux,r
来源: https://codeday.me/bug/20191029/1962008.html