我在 MacOS 10.14.5 Mojave、Rstudio(来自 Anaconda)上运行 R 3.5.1 时安装 RQDA 时遇到了一些问题。我安装了 Xquartz 2.7.11 和 GTK+ 2.24.17,但当我尝试安装 RQDA 包时,我收到以下错误消息:
* installing *source* package ‘cairoDevice’ ...
** package ‘cairoDevice’ successfully unpacked and MD5 sums checked
checking for pkg-config... no
ERROR: Cannot find pkg-config.
ERROR: configuration failed for package ‘cairoDevice’
* removing ‘/Users/danielanzola/anaconda3/lib/R/library/cairoDevice’
Warning in install.packages :
installation of package ‘cairoDevice’ had non-zero exit status
* installing *source* package ‘Matrix’ ...
** package ‘Matrix’ successfully unpacked and MD5 sums checked
** libs
x86_64-apple-darwin13.4.0-clang
-I"/Users/danielanzola/anaconda3/lib/R/include" -DNDEBUG -DNTIMER -I./SuiteSparse_config -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -I/Users/danielanzola/anaconda3/include -fPIC -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/danielanzola/anaconda3/include -fdebug-prefix-map==/usr/local/src/conda/- -fdebug-prefix-map==/usr/local/src/conda-prefix -c CHMfactor.c -o CHMfactor.o
/bin/sh: x86_64-apple-darwin13.4.0-clang: command not found
make: *** [CHMfactor.o] Error 127
ERROR: compilation failed for package ‘Matrix’
* removing ‘/Users/danielanzola/anaconda3/lib/R/library/Matrix’
Warning in install.packages :
installation of package ‘Matrix’ had non-zero exit status
* installing *source* package ‘RSQLite’ ...
** package ‘RSQLite’ successfully unpacked and MD5 sums checked
** libs
x86_64-apple-darwin13.4.0-clang++
-I"/Users/danielanzola/anaconda3/lib/R/include" -DNDEBUG -I. -DRSQLITE_USE_BUNDLED_SQLITE -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_STAT4 -DSQLITE_SOUNDEX -I"/Users/danielanzola/anaconda3/lib/R/library/BH/include" -I"/Users/danielanzola/anaconda3/lib/R/library/plogr/include" -I"/Users/danielanzola/anaconda3/lib/R/library/Rcpp/include" -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -I/Users/danielanzola/anaconda3/include -fPIC -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -I/Users/danielanzola/anaconda3/include -fdebug-prefix-map==/usr/local/src/conda/- -fdebug-prefix-map==/usr/local/src/conda-prefix -c DbColumn.cpp -o DbColumn.o
/bin/sh: x86_64-apple-darwin13.4.0-clang++: command not found
make: *** [DbColumn.o] Error 127
ERROR: compilation failed for package ‘RSQLite’
* removing ‘/Users/danielanzola/anaconda3/lib/R/library/RSQLite’
Warning in install.packages :
installation of package ‘RSQLite’ had non-zero exit status
* installing *source* package ‘RGtk2’ ...
** package ‘RGtk2’ successfully unpacked and MD5 sums checked
checking for pkg-config... no
checking for INTROSPECTION... no
checking for GTK... no
configure: error: GTK version 2.8.0 required
ERROR: configuration failed for package ‘RGtk2’
* removing ‘/Users/danielanzola/anaconda3/lib/R/library/RGtk2’
Warning in install.packages :
installation of package ‘RGtk2’ had non-zero exit status
ERROR: dependencies ‘RGtk2’, ‘cairoDevice’ are not available for package ‘gWidgetsRGtk2’
* removing ‘/Users/danielanzola/anaconda3/lib/R/library/gWidgetsRGtk2’
Warning in install.packages :
installation of package ‘gWidgetsRGtk2’ had non-zero exit status
ERROR: dependency ‘Matrix’ is not available for package ‘igraph’
* removing ‘/Users/danielanzola/anaconda3/lib/R/library/igraph’
Warning in install.packages :
installation of package ‘igraph’ had non-zero exit status
ERROR: dependencies ‘RSQLite’, ‘gWidgetsRGtk2’, ‘RGtk2’, ‘igraph’ are not available for package ‘RQDA’
* removing ‘/Users/danielanzola/anaconda3/lib/R/library/RQDA’
Warning in install.packages :
installation of package ‘RQDA’ had non-zero exit status
任何帮助将不胜感激!
答案1
为 Windows 安装 R 补丁。效果非常好。