You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

R 3.3.3环境下VGAM旧版本安装失败求助

解决Mac OS 10.9.5 + R 3.3.3下安装旧版VGAM包的问题

Looks like you're hitting a classic compiler dependency issue with old R versions on macOS Mavericks—let's break this down step by step to get VGAM installed properly.

1. What is gfortran, and why do you need it?

gfortran is the GNU Fortran compiler. Many R packages (including VGAM) have low-level code written in Fortran for better performance, so you need this compiler to build the package from source. Your error make: gfortran-4.8: No such file or directory means your system can't find the exact gfortran version VGAM 1.0-2 expects.

2. Install the right gfortran version for Mac OS 10.9.5

Since you're on Mavericks (10.9.5), you need gfortran 4.8.2—this is the compatible version for your OS:

  • Download the gfortran 4.8.2 installer made for Mac OS X 10.9 (you can find this on CRAN's tools page for legacy macOS versions).
  • Run the installer, then verify it's working by opening Terminal and typing:
    gfortran --version
    
    You should see output confirming version 4.8.2 is installed.

3. Re-run the correct source package installation

Your first method is the right way to install an old source package—now that you have gfortran, try this again in R:

install.packages('VGAM_1.0-2.tar.gz', lib = "/Users/benny/Google Drive/SEDGWICK PROJECT GRANIVORES/R", repos = NULL, dependencies = TRUE)

If you hit dependency errors first, manually install the packages VGAM 1.0-2 depends on (check the legacy CRAN page for VGAM 1.0-2 to see the full dependency list, then install those first with install.packages()).

4. Why your other two methods won't work

Let's be clear: .RData files are R workspace/dataset files—they are not R packages. Unpacking the source tarball and loading this file only loads temporary data from the package's development process, not the actual package functions or code. These methods will never let you use VGAM, so you can safely discard them.

Extra troubleshooting steps

If you still get errors after installing gfortran:

  • Make sure you have Xcode Command Line Tools installed for Mavericks. Open Terminal and run:
    xcode-select --install
    
    If that doesn't work, you may need to download the legacy Command Line Tools for Xcode 6.2 (compatible with 10.9) from Apple's developer archive.
  • Verify R is pointing to the right gfortran binary. In R, run:
    Sys.getenv("FC")
    
    If it doesn't return /usr/local/bin/gfortran-4.8, set it manually before installing:
    Sys.setenv(FC = "/usr/local/bin/gfortran-4.8")
    

内容的提问来源于stack exchange,提问作者benny_noJets

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.13 07:45:13