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

无法安装旧版本rmarkdown:安装1.8版本报错求助

Fixing the "couldn't find package 'rmarkdown'" Error When Installing Version 1.8

Hey there, that error pops up because default CRAN mirrors no longer host older versions of rmarkdown like 1.8—CRAN regularly removes outdated packages to keep their repositories streamlined. Let's walk through a couple of reliable fixes:

Option 1: Install Directly from CRAN's Archive Repository

CRAN keeps all historical package versions in an archive directory. Just point install_version to that repo instead:

devtools::install_version("rmarkdown", version = "1.8", repos = "https://cran.r-project.org/src/contrib/Archive/")

Option 2: Manually Download and Install the Source Package

If the first method doesn't work for you, try downloading the package file directly and installing it locally:

  • Grab the rmarkdown_1.8.tar.gz source package from CRAN's archive (this is the official source file for the 1.8 version)
  • Save it to a folder on your computer, say ~/Documents/R_Packages/
  • Run this command to install from the local file:
install.packages("~/Documents/R_Packages/rmarkdown_1.8.tar.gz", repos = NULL, type = "source")

Quick Pre-Install Checks

  • Make sure your R version is compatible: rmarkdown 1.8 requires R 3.0.2 or newer. You can check your version with R.version.string in the console.
  • If you hit dependency errors during installation, install any missing packages first (like knitr, a key dependency for rmarkdown) before trying again.

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.22 08:23:06