当我尝试在 R 中安装 Mosaic 包时,这个错误是啥意思?
Posted
技术标签:
【中文标题】当我尝试在 R 中安装 Mosaic 包时,这个错误是啥意思?【英文标题】:What does this error mean when I try and install the Mosaic package in R?当我尝试在 R 中安装 Mosaic 包时,这个错误是什么意思? 【发布时间】:2020-08-20 05:19:05 【问题描述】:当我尝试在 R studio 中安装马赛克包时,我收到以下消息:
> install.packages('mosaic', dependencies = TRUE)
Warning in install.packages :
dependencies ‘latticeExtra’, ‘fastR’ are not available
also installing the dependency ‘rgl’
There are binary versions available but the source versions are later:
binary source needs_compilation
rgl 0.100.50 0.100.54 TRUE
mosaic 1.5.0 1.6.0 FALSE
Do you want to install from sources the package which needs compilation? (Yes/no/cancel) No
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.5/rgl_0.100.50.tgz'
Content type 'application/x-gzip' length 4709273 bytes (4.5 MB)
==================================================
downloaded 4.5 MB
The downloaded binary packages are in
/var/folders/c8/lyjrvw_x18q2trr07z2s7m8w0000gn/T//RtmpOfzCf6/downloaded_packages
installing the source package ‘mosaic’
trying URL 'https://cran.rstudio.com/src/contrib/mosaic_1.6.0.tar.gz'
Content type 'application/x-gzip' length 12425406 bytes (11.8 MB)
==================================================
downloaded 11.8 MB
ERROR: dependency ‘latticeExtra’ is not available for package ‘mosaic’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/mosaic’
Warning in install.packages :
installation of package ‘mosaic’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/c8/lyjrvw_x18q2trr07z2s7m8w0000gn/T/RtmpOfzCf6/downloaded_packages’
我怎样才能避免这种情况?我尝试在以下行同时说“是”和“否”:
Do you want to install from sources the package which needs compilation? (Yes/no/cancel) No
两次都会出错。当我说是并尝试安装 rgl 时,我反复收到此消息:
You have not agreed to the Xcode license agreements, please run 'sudo xcodebuild -license' from within a Terminal window to review and agree to the Xcode license agreements.
当我在终端窗口中运行xcodebuild -license
时,它会要求我输入密码,但不允许我在密码槽中输入任何内容并且不会继续安装。
还有其他方法可以安装马赛克包吗?
【问题讨论】:
【参考方案1】:它的依赖项似乎还没有安装。也许先安装以下软件包:latticeExtra
和 fastR
install.packages("latticeExtra")
install.packages("fastR")
【讨论】:
当我尝试这样做时,它告诉我那些包不存在? 也许 LatticeExtra 与 R 版本 【参考方案2】:随着学期的结束,我正在清理积压的工作。抱歉,我没有早点讲到这个。
简短回答:CRAN 上有新版本的马赛克,如果您安装新版本,这个问题应该会消失。
您遇到的特定问题看起来与马赛克包建议(即非必需)的存档包有关。该包不再在马赛克的依赖列表中。
一般来说,当我遇到这样的问题时,我经常发现手动安装在包的说明文件中的 imports: 和 depends: 中列出的包将 (a) 解决问题或 (b) 确定确切的位置问题出在哪里。
【讨论】:
以上是关于当我尝试在 R 中安装 Mosaic 包时,这个错误是啥意思?的主要内容,如果未能解决你的问题,请参考以下文章