1、创建挂载点
mkdir /mnt/cdrom //创建挂载点
umount /dev/sr0
mount -t iso9660 /dev/sr0 /cdrom 或
sudo mount -t iso9660 -o loop /xxx/yyy/zzz.iso /mnt/cdrom ///xxx/yyy/zzz.iso为iso文件所在目录目录
2、 修改apt配置
cp /etc/apt/sources.list /etc/apt/sources.list.bak
方法1
deb file:///cdrom jammy main restricted //jammy是22.04的代号,换为相应版本的代号
方法2 先清空/etc/apt/sources.list
sudo apt-cdrom add //自动写入
cat /etc/apt/sources.list
deb cdrom:[Ubuntu 22.04.1 LTS Jammy Jellyfish - Release amd64 (20220809.1)]/ jammy main restricted
3、 清理和更新
sudo apt clean all
sudo apt update
apt install tree -y标签:etc,jammy,apt,sources,iso,Ubuntu,cdrom,挂载 From: https://blog.51cto.com/u_15217675/6047351