benny_noJets
benny_noJets

Reputation: 11

Need help installing VGAM package for R 3.3.3

Unable to make three previously described ways to manually install an old package (VGAM) for an old version of R (v3.3.3) to work on Platform: x86_64-apple-darwin13.4.0 (64-bit)

Previous threads on this subject that I have attempted to draw from:

Manually Downloading and Installing Packages in R

"installation of package 'FILE_PATH' had non-zero exit status" in R

I am running a Mac OS 10.9.5, so I have to run R v3.3.3. As such, I cannot load the current version of the VGAM package, so I've been trying and failing to install previous versions of it by playing with the below code, but all three attempts result in a non-zero exit status. It appears that there is a problem with gfortran? Not sure what this is or what it does.

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'))

I expect to successfully install the VGAM package, but I get the following error messages, for each code chunk, respectively:

>* 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

For the second chunk/attempt, the file.copy() method just produces "FALSE" output, and does not appear to properly create the 'VGAM.RData' file like I want it to:

[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

The third chunk/attempt returns the following error:

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

Upvotes: 1

Views: 1843

Answers (0)

Related Questions