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

RStudio中安装broom与nlme包失败问题求助

Fixing the Broom Package Installation Failure (Dependency Issues with nlme/psych)

Hey there, let's break down why you're hitting this error when trying to install broom. Looking at your error log and the library path /home/gherr/R/x86_64-pc-linux-gnu-library/3.2/, it's clear you're running R 3.2.x—a version that's over 8 years old at this point. Most modern CRAN packages (including newer versions of broom, psych, and nlme) no longer support such an outdated R release, which is the root cause here.

Here are two ways to fix this:

This is the most straightforward and long-term solution. Newer R versions come with better compatibility, more features, and bug fixes:

  • Head to the official R website to download the latest version for your Linux system, then follow the installation instructions for your distro.
  • Once upgraded, restart RStudio and run install.packages("broom") again. All dependencies should install automatically without issues.

Option 2: Install Older Package Versions (Only if You Can't Upgrade R)

If upgrading R isn't an option right now, you'll need to track down older versions of the packages that work with R 3.2.x:

  1. First, install an older nlme version that supports R 3.2 (like nlme 3.1-122):
    • Download the .tar.gz file for this version from CRAN's archive.
    • Run this command in RStudio (replace the file path with where you saved the download):
      install.packages("/path/to/nlme_3.1-122.tar.gz", repos = NULL, type = "source")
      
  2. Next, install an older psych version (like psych 1.5.8):
    • Grab the compatible .tar.gz from CRAN's archive, then install with:
      install.packages("/path/to/psych_1.5.8.tar.gz", repos = NULL, type = "source")
      
  3. Finally, install an older broom version (like broom 0.4.1):
    • Download the matching .tar.gz and run:
      install.packages("/path/to/broom_0.4.1.tar.gz", repos = NULL, type = "source")
      

Just a heads-up: This method is clunky, and older package versions might have bugs or missing features. Upgrading R is definitely the better call if you can swing it.

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.26 10:07:57