1

无法使用上述三种方法手动安装旧版本的 R (v3.3.3) 的旧包 (VGAM) 以在平台上工作:x86_64-apple-darwin13.4.0 (64-bit)

我试图从中汲取的有关此主题的先前线程:

在 R 中手动下载和安装包

R中的“安装包'FILE_PATH'的退出状态非零”

我正在运行 Mac OS 10.9.5,所以我必须运行 R v3.3.3。因此,我无法加载 VGAM 包的当前版本,所以我一直在尝试通过使用以下代码安装它的早期版本,但失败了,但所有三个尝试都导致非零退出状态。看来gfortran有问题?不知道这是什么或它做什么。

install.packages('VGAM_1.0-2.tar.gz', lib = "/Users/benny/Google Drive/SEDGWICK PROJECT GRANIVORES/R", repos = NULL, dependencies = TRUE)
download.file('https://cran.r-project.org/src/contrib/Archive/VGAM/VGAM_1.0-0.tar.gz', 
              f <- tempfile())
untar(f, exdir=tempdir())
file.copy(file.path(tempdir(), '.RData'), 'VGAM.RData')
# the above copies the .RData file to a file called VGAM.RData in your current 
# working directory.
load('VGAM.RData')
download.file('https://cran.r-project.org/src/contrib/Archive/VGAM/VGAM_1.0-0.tar.gz',
              f <- tempfile())
untar(f, exdir=tempdir())
load(file.path(tempdir(), '.RData'))

我希望能够成功安装 VGAM 包,但是对于每个代码块,我分别收到以下错误消息:

>* installing *source* package ‘VGAM’ ...
** package ‘VGAM’ successfully unpacked and MD5 sums checked
** libs
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 -g -O2  -c caqo3.c -o caqo3.o
gfortran-4.8   -fPIC  -g -O2  -c cqof.f -o cqof.o
make: gfortran-4.8: No such file or directory
make: *** [cqof.o] Error 1
ERROR: compilation failed for package ‘VGAM’
* removing ‘/Users/benny/Google Drive/SEDGWICK PROJECT GRANIVORES/R/VGAM’
* restoring previous ‘/Users/benny/Google Drive/SEDGWICK PROJECT GRANIVORES/R/VGAM’
Warning in install.packages :
  installation of package ‘VGAM_1.0-2.tar.gz’ had non-zero exit status

对于第二个块/尝试,file.copy() 方法只产生“FALSE”输出,并且似乎没有像我想要的那样正确创建“VGAM.RData”文件:

[1] FALSE

> load('VGAM.RData')

cannot open compressed file 'VGAM.RData', probable reason 'No such file or directory'
Error in readChar(con, 5L, useBytes = TRUE) : cannot open the connection

第三个块/尝试返回以下错误:

cannot open compressed file '/var/folders/03/9d3s2ktx79l_wm7n2w9vmcdh0000gn/T//Rtmpdb04UI/.RData', probable reason 'No such file or directory'
Error in readChar(con, 5L, useBytes = TRUE) : cannot open the connection
4

0 回答 0