r - 无法在 R 3.6.3 中安装 lme4 包。在 macOS Catalina 上
问题描述
我无法安装 lme4(它工作正常,然后我离开了一段时间,在此期间进行了一两次更新,现在相同的代码已经停止工作)。
我正在使用的代码是:
install.packages("lme4", dependencies = TRUE)
library(lme4)
我得到的错误是:
There is a binary version available but the source version is later:
binary source needs_compilation
Rcpp 1.0.4 1.0.4.6 TRUE
Do you want to install from sources the package which needs compilation? (Yes/no/cancel)
第一个问题 - 这是否表明问题出在 lme4 所依赖的 Rcpp 包上?
我输入:
y
第二个问题 - 这是正确的做法吗?
我收到以下消息:
The downloaded binary packages are in
/var/folders/fr/x0qmcc0d3s1grpw1dc946sch0000gn/T//RtmpCLLS34/downloaded_packages
installing the source package ‘Rcpp’
trying URL 'https://cran.ma.imperial.ac.uk/src/contrib/Rcpp_1.0.4.6.tar.gz'
Content type 'application/x-gzip' length 2751467 bytes (2.6 MB)
==================================================
downloaded 2.6 MB
* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
ERROR: compilation failed for package ‘Rcpp’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp’
The downloaded source packages are in
‘/private/var/folders/fr/x0qmcc0d3s1grpw1dc946sch0000gn/T/RtmpCLLS34/downloaded_packages’
Warning message:
In install.packages("lme4", dependencies = TRUE) :
installation of package ‘Rcpp’ had non-zero exit status
第三个问题 - 上述消息是什么意思,我该如何解决?
在此先感谢您的帮助!
解决方案
推荐阅读
- apache-flink - ConnectedStreams 中 2 个流之一的饥饿
- sip - 如何在 Freeswitch 中获取 SIP 标头的值?
- c# - C# 无法从只读 Excel 文件中读取
- uwp - 删除附加 Flyout 时添加到 AppBarButton 的 V 形/箭头
- jquery - 生成 Jekyll Liquid 内容而不包含它(仅来自 JQuery 加载函数)
- asp.net-core - ASP.Net Core - 如何使用自定义“ModelBindingMessageProvider”
- google-bigquery - 为什么我的 bigquery sql 没有返回任何结果?
- css - 使文本隐藏和省略号
- ios - RegEx 在 RegexR 中在线工作,但在 NSRegularExpression 中无法在 iOS 上初始化
- javascript - 如何在特定搜索 id 的 javascript 数组对象中求和值?