假设我在“/etc/fstab”:
/iso/apt.iso /mnt/apt iso9660 loop 0 0
我运行这些命令作为根用户:
mount --all
apt-cdrom add --no-mount --cdrom /mnt/apt
我希望将磁盘添加为 APT 源,但没有任何反应。少了什么东西?
更新:
我跟着这个建议现在我得到了这个:
Using CD-ROM mount point /media/cdrom/
Identifying.. [61c5dd7c11a32dc999e655c235cd698e-2]
Scanning disc for index files..
Found 0 package indexes, 0 source indexes, 0 translation indexes and 0 signatures
W: Failed to mount '/dev/sr0' to '/media/cdrom/'
E: Unable to locate any package files, perhaps this is not a Debian Disc or the wrong architecture?
无论有或没有“/etc/apt/apt.conf“ 变化。
答案1
这对我有用:
首先,该行/etc/fstab
应如下所示:
/iso/apt.iso /mnt/apt iso9660 user,loop 0 0
然后,安装挂载点后,apt-cdrom
像这样运行:
apt-cdrom -m -d=/mnt/apt add
如果 apt 仍然要求您插入磁盘,请将这些行添加到 apt.conf
Acquire::cdrom::mount "/mnt/apt";
APT::CDROM::NoMount;
我想你应该会发现这也适合你:)