日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

[debian]use ISO as debian apt source / 使用ISO文件作为apt源

發(fā)布時(shí)間:2025/6/17 编程问答 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 [debian]use ISO as debian apt source / 使用ISO文件作为apt源 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

  準(zhǔn)備文件:

debian-9.8.0-amd64-DVD-1.iso

debian-9.8.0-amd64-DVD-2.iso

debian-9.8.0-amd64-DVD-3.iso

  掛載:

?

root@debian:~# mount -t iso9660 -o loop /debian/debian-9.8.0-amd64-DVD-1.iso /mnt/debian1
mount: /dev/loop0 is write-protected, mounting read-only
root@debian:~# mount -t iso9660 -o loop /debian/debian-9.8.0-amd64-DVD-2.iso /mnt/debian2
mount: /dev/loop1 is write-protected, mounting read-only
root@debian:~# mount -t iso9660 -o loop /debian/debian-9.8.0-amd64-DVD-3.iso /mnt/debian3
mount: /dev/loop2 is write-protected, mounting read-only

  查看mount:

/dev/sda1 on /home type ext4 (rw,relatime,data=ordered)
tmpfs on /run/user/108 type tmpfs (rw,nosuid,nodev,relatime,size=405056k,mode=700,uid=108,gid=113)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=405056k,mode=700)
/debian/debian-9.8.0-amd64-DVD-2.iso on /mnt/debian2 type iso9660 (ro,relatime)
/debian/debian-9.8.0-amd64-DVD-3.iso on /mnt/debian3 type iso9660 (ro,relatime)
/debian/debian-9.8.0-amd64-DVD-1.iso on /mnt/debian1 type iso9660 (ro,relatime)

  修改/etc/fstab:

[defaults 可以改為 user,loop]

?  添加apt源:

#vim /etc/apt/sources.list

刪除這個(gè)文件

?

apt-cdrom -m -d=/mnt/debian1 addapt-cdrom -m -d=/mnt/debian2 addapt-cdrom -m -d=/mnt/debian3 add

?

  新增apt.conf

Acquire::cdrom::mount "/mnt/debian1"; Acquire::cdrom::mount "/mnt/debian2"; Acquire::cdrom::mount "/mnt/debian3"; APT::CDROM::NoMount;

?

目前只能安裝第一張DVD中的包 如果在后兩個(gè)磁盤(如lsscsi)會(huì)提示需要插入磁盤:

root@debian:~# apt install lsscsi Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed:lsscsi 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/35.6 kB of archives. After this operation, 89.1 kB of additional disk space will be used. Media change: please insert the disc labeled'Debian GNU/Linux 9.8.0 _Stretch_ - Official amd64 DVD Binary-2 20190216-11:59' in the drive '/mnt/debian1/' and press [Enter]

?

轉(zhuǎn)載于:https://www.cnblogs.com/alfredsun/p/10751094.html

總結(jié)

以上是生活随笔為你收集整理的[debian]use ISO as debian apt source / 使用ISO文件作为apt源的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。