1

我正在尝试安装一个名为rcddusing的 R 包conda build,但 C 编译器存在问题。请注意,这个问题看起来非常类似于 Conda build R package failed at C compiler issue on MacOS Mojave但是因为(i)该问题仍未得到解答,并且(ii)这与不同的包有关,我认为这不是一个重复的问题。

我正在使用 MacOS Mojave,conda 4.6.8。r-base在安装并安装了新的 conda 环境中r-essentials ,我尝试

conda install conda-build
conda skeleton cran --recursive rcdd
conda build r-rcdd

并得到以下错误

* installing *source* package ‘rcdd’ ...
** package ‘rcdd’ successfully unpacked and MD5 sums checked
checking for gcc... x86_64-apple-darwin13.4.0-clang
checking whether the C compiler works... no
configure: error: in `/Users/pjethwa/miniconda3/envs/r_env/conda-bld/r-rcdd_1553173041138/work':
configure: error: C compiler cannot create executables
See `config.log' for more details
ERROR: configuration failed for package ‘rcdd’

config.log 文件包含相同的错误消息。当我尝试直接从 R 安装时也会出现同样的错误 - 即使用install.packages('rcdd'). 但是,我可以使用conda未安装的 R 版本安装此软件包。这个解决方案不能令人满意,因为我想用它rpy2来连接 python 和 R,这似乎需要通过 conda 安装 R(例如,见Getting Segmentation fault Core dumped error while importing robjects from rpy2

我的 clang/gcc 版本是:

(r_env) myusername:~ clang --version
clang version 4.0.1 (tags/RELEASE_401/final)
Target: x86_64-apple-darwin18.2.0
Thread model: posix
InstalledDir: /Users/myusername/miniconda3/envs/r_env/bin    

(r_env) myusername:~ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 10.0.0 (clang-1000.10.44.4)
Target: x86_64-apple-darwin18.2.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
4

0 回答 0