Correctly Set Up Ubuntu/Debian to Install Packages from Local DVDs

Shahriar Shovon

Supported OS

  • All

Categories

Share this post with your friends

Mounting the DVD

The first step is to mount the DVDs. I am using Debian 9. I downloaded 4 Debian DVDs. First I am going to create the mountpoints for the DVDs. sudo mkdir /mnt/dvd{1..4} Now I am going to mount the DVDs to the mountpoint. sudo mount ~/Downloads/debian-9.0.0-amd64-DVD-1.iso /mnt/dvd1 sudo mount ~/Downloads/debian-9.0.0-amd64-DVD-2.iso /mnt/dvd2 sudo mount ~/Downloads/debian-9.0.0-amd64-DVD-3.iso /mnt/dvd3 sudo mount ~/Downloads/debian-9.0.0-amd64-DVD-4.iso /mnt/dvd4

Adding the local repositories to sources.list

sudo nano /etc/apt/sources.list Now add the following lines to the file. deb [ trusted=yes ] file:///mnt/dvd1 stretch main deb [ trusted=yes ] file:///mnt/dvd2 stretch main deb [ trusted=yes ] file:///mnt/dvd3 stretch main deb [ trusted=yes ] file:///mnt/dvd4 stretch main Now save the file and do an apt-get update. sudo apt-get update

Note

Without trusted=yes, you will get annoying package verification messages. You will also get error messages when you run apt-get update Like this W: The repository 'file:/mnt/dvd1 stretch Release' is not signed. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details.