我试图为R安装软件包C50
,但没有成功。
我通过Anaconda使用R,但是该软件包在Anaconda环境中不可用,因此我尝试直接从RStudio安装它。
我都使用了标准install.packages("C50")
以及从GitHub存储库直接安装(使用devtools
)。
进行搜索似乎是与SDK标头(?我不知道那是什么)以及MacOs系统中目录随时间的演变有关的问题。
一个在线搜索将我引到了这里(但我又不知道如何前进):
https://github.com/conda-forge/compilers-feedstock/issues/11
我在尝试安装软件包时显示以下消息:
* installing *source* package ‘Cubist’ ...
** package ‘Cubist’ successfully unpacked and MD5 sums checked
** using staged installation
checking for gcc... x86_64-apple-darwin13.4.0-clang
checking whether the C compiler works... no
configure: error: in `/private/var/folders/sh/hq44lqs10677_vvkvxq01yvh0000gn/T/Rtmpk04dKp/R.INSTALL5020659d63fc/Cubist':
configure: error: C compiler cannot create executables
See `config.log' for more details
ERROR: configuration failed for package ‘Cubist’
* removing ‘/opt/anaconda3/lib/R/library/Cubist’
* restoring previous ‘/opt/anaconda3/lib/R/library/Cubist’
Warning in install.packages :
installation of package ‘Cubist’ had non-zero exit status
* installing *source* package ‘C50’ ...
** package ‘C50’ successfully unpacked and MD5 sums checked
** using staged installation
checking for gcc... x86_64-apple-darwin13.4.0-clang
checking whether the C compiler works... no
configure: error: in `/private/var/folders/sh/hq44lqs10677_vvkvxq01yvh0000gn/T/Rtmp2NjIsn/R.INSTALL50b47eac3131/C50':
configure: error: C compiler cannot create executables
See `config.log' for more details.
ERROR: configuration failed for package ‘C50’
* removing ‘/opt/anaconda3/lib/R/library/C50’
Warning in install.packages :
installation of package ‘C50’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/sh/hq44lqs10677_vvkvxq01yvh0000gn/T/RtmpdUmDxS/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
另一个提示是查看config.log
,但我不知道如何找到它。
我不知道如何解释此消息,任何提示都很好。
答案 0 :(得分:0)
一种可能性是您的xcode
许可证已过期。尝试运行:
sudo xcodebuild -license
在命令行中,然后同意许可。