无法安装leaps包,dyn.load中的错误(文件,DLLpath = DLLpath,...)[Mac OSX]

时间:2012-11-26 21:57:12

标签: r

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

> 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

1 个答案:

答案 0 :(得分:1)

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