3

我正在尝试为 R 安装跳跃包,但我一直遇到一个奇怪的错误。谷歌搜索似乎没有发现任何有用的东西。我尝试在其他计算机上安装并确认它可以工作。

> install.packages("leaps")
Installing package(s) into ‘/usr/local/Cellar/r/2.15.2/R.framework/Versions/2.15/Resources/library’
(as ‘lib’ is unspecified)
trying URL 'http://ftp.ussg.iu.edu/CRAN/src/contrib/leaps_2.9.tar.gz'
Content type 'application/x-gzip' length 26847 bytes (26 Kb)
opened URL
==================================================
downloaded 26 Kb

* installing *source* package ‘leaps’ ...
** libs
/usr/local/bin/gfortran   -fPIC   -c leaps.f -o leaps.o
/usr/local/bin/gfortran   -fPIC   -c leapshdr.f -o leapshdr.o
cc -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o leaps.so leaps.o leapshdr.o -L/usr/local/Cellar/gfortran/4.2.4-5666.3/lib/gcc/i686-apple-darwin11/4.2.1/x86_64 -L/usr/local/Cellar/gfortran/4.2.4-5666.3/lib/gcc/i686-apple-darwin11/4.2.1 -L/usr/local/Cellar/gfortran/4.2.4-5666.3/lib/gcc -L/usr/local/Cellar/gfortran/4.2.4-5666.3/lib -lgfortran -F/usr/local/Cellar/r/2.15.2/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /usr/local/Cellar/r/2.15.2/R.framework/Versions/2.15/Resources/library/leaps/libs
** R
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/usr/local/Cellar/r/2.15.2/R.framework/Versions/2.15/Resources/library/leaps/libs/leaps.so':
  dlopen(/usr/local/Cellar/r/2.15.2/R.framework/Versions/2.15/Resources/library/leaps/libs/leaps.so, 6): Symbol not found: __gfortran_transfer_character_write
  Referenced from: /usr/local/Cellar/r/2.15.2/R.framework/Versions/2.15/Resources/library/leaps/libs/leaps.so
  Expected in: flat namespace
 in /usr/local/Cellar/r/2.15.2/R.framework/Versions/2.15/Resources/library/leaps/libs/leaps.so
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/usr/local/Cellar/r/2.15.2/R.framework/Versions/2.15/Resources/library/leaps’
Warning in install.packages :
  installation of package ‘leaps’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/ts/f_f4vqnx02d5pzbt6zqp5wt00000gn/T/Rtmp3tg6VV/downloaded_packages’

我尝试从不同的镜像安装并​​从源安装。如果相关,这是 sessionInfo() 的输出:

> sessionInfo()
R version 2.15.2 (2012-10-26)
Platform: x86_64-apple-darwin12.2.0 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] tools_2.15.2
4

1 回答 1

1

看看https://github.com/hadley/devtools/issues/373上的讨论。问题似乎与Rcpp包裹有关。

于 2015-07-05T14:31:15.500 回答