Use apt get install without inserting the DVD?

You could copy the DVD to an ISO and then mount it permanently as a filesystem on the machine (and point apt at it, by modifying /etc/apt/sources.list). However, assuming the machine has an Internet connection, you could just switch to using the online repositories.

Details are here.

But here's an example,

Edit /etc/apt/sources.list and replace the contents with this (this works for Wheezy or Debian 7, for earlier or later versions, check the link above),

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

Then run apt-get update to refresh the package details.


Just a caveat here.

If you're dealing with some problem where you've got incorrect settings in /etc/apt/sources.list, e.g. a disk is expected, it's probably a good idea to to rewrite the file from scratch.

To do this for Debian I just used https://debgen.simplylinux.ch/ to generate the file.

Initially I just tried just removing the reference from sources.list as recommended, but then I subsequently got other errors when trying to update packages, such as

Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution...`

or

git : Depends: liberror-perl but it is not installable

These came up for me because my version of sources.list didn't point to the package sources I needed, however regenerating sources.list fixed this problem.

Tags:

Debian