错误:通过安装ggp​​lot2安装rlang和摘要软件包时无法找到xcodebuild

在RStudio的Macbook 10.15上,我尝试安装ggplot2,但是与digestrlang相关的依存关系出现错误。我确实执行过xcode-select --install来安装它,还重新启动了Mac。

但是R似乎找不到xcode。

我注意到错误消息抱怨xcode路径。这是鲱鱼还是问题的根源?

Metroids-MacBook-Air:~ metroid$ xcode-select -p
/Applications/Xcode.app/Contents/Developer

路径应设置为什么,为什么默认不设置?

有什么想法吗?

请参见以下内容:

> install.packages("ggplot2")
also installing the dependencies ‘digest’,‘rlang’


  There are binary versions available but the source versions are later:
       binary source needs_compilation
digest 0.6.21 0.6.22              TRUE
rlang   0.4.0  0.4.1              TRUE

Do you want to install from sources the packages which need compilation? (Yes/no/cancel) Yes
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/ggplot2_3.2.1.tgz'
Content type 'application/x-gzip' length 3973186 bytes (3.8 MB)
==================================================
downloaded 3.8 MB


The downloaded binary packages are in
    /var/folders/q5/pqd495t95fq3tjtbxbdsvv_00000gn/T//Rtmp8aJzND/downloaded_packages
installing the source packages ‘digest’,‘rlang’

trying URL 'https://cran.rstudio.com/src/contrib/digest_0.6.22.tar.gz'
Content type 'application/x-gzip' length 141968 bytes (138 KB)
==================================================
downloaded 138 KB

trying URL 'https://cran.rstudio.com/src/contrib/rlang_0.4.1.tar.gz'
Content type 'application/x-gzip' length 797012 bytes (778 KB)
==================================================
downloaded 778 KB

* installing *source* package ‘digest’ ...
** package ‘digest’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
dyld: Symbol not found: _kConditionalConnectionRequirementTimeWindowStartTime
  Referenced from: /Applications/Xcode.app/Contents/Developer/usr/bin/../../../SharedFrameworks/DVTFoundation.framework/Versions/A/DVTFoundation
  Expected in: /System/library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
 in /Applications/Xcode.app/Contents/Developer/usr/bin/../../../SharedFrameworks/DVTFoundation.framework/Versions/A/DVTFoundation
make: error: unable to locate xcodebuild,please make sure the path to the Xcode folder is set correctly!
make: error: You can set the path to the Xcode folder using /usr/bin/xcode-select -switch
ERROR: compilation failed for package ‘digest’
* removing ‘/library/Frameworks/R.framework/Versions/3.6/Resources/library/digest’
Warning in install.packages :
  installation of package ‘digest’ had non-zero exit status
* installing *source* package ‘rlang’ ...
** package ‘rlang’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
dyld: Symbol not found: _kConditionalConnectionRequirementTimeWindowStartTime
  Referenced from: /Applications/Xcode.app/Contents/Developer/usr/bin/../../../SharedFrameworks/DVTFoundation.framework/Versions/A/DVTFoundation
  Expected in: /System/library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
 in /Applications/Xcode.app/Contents/Developer/usr/bin/../../../SharedFrameworks/DVTFoundation.framework/Versions/A/DVTFoundation
make: error: unable to locate xcodebuild,please make sure the path to the Xcode folder is set correctly!
make: error: You can set the path to the Xcode folder using /usr/bin/xcode-select -switch
ERROR: compilation failed for package ‘rlang’
* removing ‘/library/Frameworks/R.framework/Versions/3.6/Resources/library/rlang’
Warning in install.packages :
  installation of package ‘rlang’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/q5/pqd495t95fq3tjtbxbdsvv_00000gn/T/Rtmp8aJzND/downloaded_packages’
> 
liubing065 回答:错误:通过安装ggp​​lot2安装rlang和摘要软件包时无法找到xcodebuild

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3169757.html

大家都在问