安装Rweka软件包时,出现此错误消息:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
输入此消息进行故障排除后,我找到了this。所以我安装了XCode 8.2.1和R版本信息:
R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin13.4.0 (64-bit)
但我仍然有这个错误,完整的代码是:
> install.packages("RWeka",dependencies = T)
also installing the dependency ‘partykit’
There are binary versions available but the source versions are later:
binary source needs_compilation
partykit 1.0-5 1.1-1 TRUE
RWeka 0.4-26 0.4-29 FALSE
Do you want to install from sources the package which needs compilation?
y/n: y
installing the source packages ‘partykit’, ‘RWeka’
essai de l'URL 'https://cran.rstudio.com/src/contrib/partykit_1.1-1.tar.gz'
Content type 'application/x-gzip' length 1285893 bytes (1.2 MB)
==================================================
downloaded 1.2 MB
essai de l'URL 'https://cran.rstudio.com/src/contrib/RWeka_0.4-29.tar.gz'
Content type 'application/x-gzip' length 408921 bytes (399 KB)
==================================================
downloaded 399 KB
* installing *source* package ‘partykit’ ...
** package ‘partykit’ correctement décompressé et sommes MD5 vérifiées
** libs
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
ERROR: compilation failed for package ‘partykit’
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/partykit’
Warning in install.packages :
installation of package ‘partykit’ had non-zero exit status
* installing *source* package ‘RWeka’ ...
** package ‘RWeka’ correctement décompressé et sommes MD5 vérifiées
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
** R
** inst
** preparing package for lazy loading
JavaVM: requested Java version ((null)) not available. Using Java at "" instead.
JavaVM: Failed to load JVM: /bundle/Libraries/libserver.dylib
JavaVM FATAL: Failed to load the jvm library.
Error : .onLoad failed in loadNamespace() for 'RWekajars', details:
call: .jinit()
error: JNI_GetCreatedJavaVMs returned -1
ERROR: lazy loading failed for package ‘RWeka’
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/RWeka’
Warning in install.packages :
installation of package ‘RWeka’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/9f/f7jyvvys30qgjkk3px1_ssh80000gn/T/Rtmp7zgnkY/downloaded_packages’