我已经通过brew
. 对于一个项目,我需要 R 库geoR
中的一个函数,该函数又依赖于tcl-tk
. 我也通过 brew: 安装了这个brew install tcl-tk
。但是,尝试安装geoR
仍然会导致以下错误 - 我没有得到。重新安装 R/RStudio 没有帮助。也没有重新启动我的 Mac。哦,尝试geoR
从 CRAN 下载的二进制文件安装也无济于事……最后,尝试tcl-tk
从 R 网站安装软件包也不能解决这个问题。
我也在GitHub 上发布了这个brew
——但也许其他人访问了 StackOverflow 的领域。
我的brew
状态
brew config
HOMEBREW_VERSION: 1.5.2
ORIGIN: https://github.com/Homebrew/brew
HEAD: 60a30e966b7cece5bd4823dae3fb981ab85106ea
Last commit: 11 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 8c1c4f86a269cb23d9d92008abf1a37eabb297b6
Core tap last commit: 2 hours ago
HOMEBREW_PREFIX: /usr/local
CPU: quad-core 64-bit skylake
Homebrew Ruby: 2.3.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Clang: 9.0 build 900
Git: 2.16.1 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
Perl: /usr/bin/perl
Python: /usr/local/opt/python/libexec/bin/python => /usr/local/Cellar/python/2.7.14_2/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Java: 9.0.1
macOS: 10.13.3-x86_64
Xcode: N/A
CLT: 9.2.0.0.1.1510905681
X11: 2.7.11 => /opt/X11
错误
* installing *source* package ‘geoR’ ...
** package ‘geoR’ successfully unpacked and MD5 sums checked
** libs
clang -I/usr/local/Cellar/r/3.4.3_1/lib/R/include -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/include -fPIC -g -O2 -c geoR.c -o geoR.o
clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/Cellar/r/3.4.3_1/lib/R/lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/readline/lib -L/usr/local/lib -o geoR.so geoR.o -L/usr/local/Cellar/r/3.4.3_1/lib/R/lib -lR -lintl -Wl,-framework -Wl,CoreFoundation
installing to /usr/local/lib/R/3.4/site-library/geoR/libs
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Warning: S3 methods ‘as.character.tclObj’, ‘as.character.tclVar’, ‘as.double.tclObj’, ‘as.integer.tclObj’, ‘as.logical.tclObj’, ‘as.raw.tclObj’, ‘print.tclObj’, ‘[[.tclArray’, ‘[[<-.tclArray’, ‘$.tclArray’, ‘$<-.tclArray’, ‘names.tclArray’, ‘names<-.tclArray’, ‘length.tclArray’, ‘length<-.tclArray’, ‘tclObj.tclVar’, ‘tclObj<-.tclVar’, ‘tclvalue.default’, ‘tclvalue.tclObj’, ‘tclvalue.tclVar’, ‘tclvalue<-.default’, ‘tclvalue<-.tclVar’, ‘close.tkProgressBar’ were declared in NAMESPACE but not found
Error : .onLoad failed in loadNamespace() for 'tcltk', details:
call: fun(libname, pkgname)
error: Tcl/Tk support is not available on this system
ERROR: lazy loading failed for package ‘geoR’
* removing ‘/usr/local/lib/R/3.4/site-library/geoR’
* restoring previous ‘/usr/local/lib/R/3.4/site-library/geoR’
The downloaded source packages are in
‘/private/var/folders/kh/0s66cjl5487fg_fhwgxqd2340000gn/T/RtmpooD5vJ/downloaded_packages’
Warning message:
In install.packages("geoR") :
installation of package ‘geoR’ had non-zero exit status