安装库时如何更改 R 编译 C 脚本的位置?

问题描述 投票:0回答:1

R 正在使用

/private/tmp/*
安装库并编译 C 脚本。由于我的机器上的权限问题,我需要更改完成的位置。我该如何改变这个?

我记得有一个解决方案,我相信它涉及在 .Renviron 中设置一些东西,但我找不到它。

* installing *source* package ‘stringi’ ...
** package ‘stringi’ successfully unpacked and MD5 sums checked
** using staged installation
checking for R_HOME... /opt/homebrew/Cellar/r/4.4.0_1/lib/R
checking for R... /opt/homebrew/Cellar/r/4.4.0_1/lib/R/bin/R
checking for endianness... little
checking for cat... /bin/cat
checking whether the C++ compiler works... no
configure: error: in `/private/tmp/RtmpFvn4n8/R.INSTALL1707236046/stringi':
configure: error: C++ compiler cannot create executables
See `config.log' for more details
r c
1个回答
0
投票

R 使用 TMPDIR 环境变量进行编译(请参阅R 安装和管理)。我的 TMPDIR(在 .Renviron 中设置)被删除,因此它默认为

/tmp
,它指向
/private/tmp

我刚刚创建了目录(具有可执行权限)。

© www.soinside.com 2019 - 2024. All rights reserved.