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

Ubuntu 18.04 LTS无可用R CRAN仓库,咨询镜像更新时长

解决Ubuntu 18.04安装R与R Studio的问题

Hey there! I’ve been through similar headaches with new Ubuntu LTS releases, so let’s break down your questions and fix this step by step.

CRAN镜像更新周期

CRAN官方团队 typically rolls out support for new Ubuntu versions within 1-2 weeks of the OS’s official launch. But keep in mind that individual mirror sites (like the mtu.edu one you’re using) need to sync these updates from the official CRAN servers, which might add an extra day or two—global mirrors don’t all refresh at the exact same time.

If you can’t wait, you can temporarily use the Artful Aardvark repository to install R. Ubuntu LTS versions have solid backward compatibility, so Artful’s R packages should work just fine on Bionic. Once the Bionic repo goes live, you can switch over easily.

Fixing the add-apt-repository command failure

Chances are your system is missing a critical tool package needed to run that command. First, install the required dependencies:

sudo apt update && sudo apt install software-properties-common

Once that’s done, you can add the Artful CRAN repository without issues:

sudo add-apt-repository "deb https://cran.mtu.edu/bin/linux/ubuntu artful/"

Now update your package list and install R:

sudo apt update
sudo apt install r-base r-base-dev

Installing R Studio

R Studio usually supports new Ubuntu versions faster than CRAN mirrors do. You can grab the Ubuntu 18.04-compatible .deb package directly, then install it with:

sudo dpkg -i rstudio-x.y.z-amd64.deb

(Replace rstudio-x.y.z-amd64.deb with the actual filename you downloaded.) If you hit dependency errors, run this to fix them:

sudo apt -f install

Switching to the Bionic repo later

Once CRAN mirrors update to support Bionic, don’t forget to swap out the Artful source:

  1. Open the CRAN source file: sudo nano /etc/apt/sources.list.d/cran.list
  2. Replace artful with bionic
  3. Save and exit, then run: sudo apt update

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.27 03:54:55