我使用 DVD 版本安装了 Debian 7,所以每次我尝试使用 apt-get 安装某些东西时,系统都会要求我安装 DVD。有没有办法避免这种情况(每次插入 DVD)。
您可以将 DVD 复制到 ISO,然后将其作为文件系统永久安装在机器上(并通过修改 apt 指向它/etc/apt/sources.list
)。但是,假设机器有 Internet 连接,您可以切换到使用在线存储库。
详细信息在这里。
但这里有一个例子,
编辑 /etc/apt/sources.list 并用此替换内容(这适用于 Wheezy 或 Debian 7,对于早期或更高版本,请查看上面的链接),
deb http://http.debian.net/debian wheezy main contrib non-free
deb-src http://http.debian.net/debian wheezy main contrib non-free
deb http://http.debian.net/debian wheezy-updates main contrib non-free
deb-src http://http.debian.net/debian wheezy-updates main contrib non-free
deb http://security.debian.org/ wheezy/updates main contrib non-free
deb-src http://security.debian.org/ wheezy/updates main contrib non-free
Run Code Online (Sandbox Code Playgroud)
然后运行apt-get update
以刷新包详细信息。