我正在尝试使用rcdd
安装一个名为conda build
的R软件包,C编译器有问题。请注意,此问题看起来与
Conda build R package fails at C compiler issue on MacOS Mojave但是,由于(i)该问题仍未得到解答,并且(ii)这与其他软件包有关,我认为这不是重复的问题。
我正在使用conda 4.6.8的MacOS Mojave。在具有r-base
和r-essentials
的新conda环境中
安装,我尝试
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')
),也会出现相同的错误。我 am 能够使用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