ubuntu apt 安装报错:Media change: please insert the disc labeled 'Ubuntu 20.04.5 LTS Focal Fossa - Release amd64 (20220831)' in the drive '/cdrom/' and press [Enter]

前言

如果你在 Ubuntu 上使用 apt 安装软件包时遇到 "Media change: please insert the disc labeled ..." 的错误消息,这通常是因为 apt 源列表中包含 CD/DVD 源,但你的系统中没有插入相应的安装介质(CD 或 DVD)。

解决

检查 /etc/apt/sources.list文件中,是否出现 CD/DVD 源。

类似 deb cdrom:[Ubuntu 20.04.5 LTS _Focal Fossa_ - Release amd64 (20220831)]/ focal main restricted 的行,则表示你的 apt 源列表中包含 CD/DVD 源。

编辑 /etc/apt/sources.list 文件,使用 # 注释 CD/DVD 源所在行,然后保存文件。

更新 apt 缓存,并清除旧的源信息:

复制代码
sudo apt-get update
sudo apt-get clean
posted @   牛奔  阅读(639)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
历史上的今天:
2022-05-10 解决本地代理问题 git 或者 curl Failed to connect to 127.0.0.1 port 1087 after 8 ms: Connection refused
2022-05-10 mysql存储过程之循环遍历查询结果集
2021-05-10 mac php.ini在哪
2021-05-10 js 时间转时间戳
点击右上角即可分享
微信分享提示