4

Can I install Debian packages from Stretch DVD 2 and 3 after installation using apt? Because installing on VM, it didn't detect the second and the third DVD.

4
  • 1
    Note to reviewers: this isn’t a duplicate of the previous question; this is about installing packages from DVDs after installation, the previous question is about installing packages from DVDs during installation. Apr 17, 2019 at 8:18
  • @StephenKitt Thanks for clearing that up. I'm very new to Linux. I'm sizing it up to see if I can buy a harddrive and install use it as my main operating system, and downgrade Windows to my secondary operating system. I want to use Linux because I do two things mainly: Web dev, and vision/graphics. Windows has better Vision/graphics tools (also, Visual Studio) but Linux has better web dev tools. Thanks. Apr 17, 2019 at 8:24
  • 1
    @GAD3R That was about detecting the DVD "during" the installation. This is about using apt to install them "after" it's been all set up. I have added the images to my hypervisor, I just need a guide to install them from a DVD. I couldn't find anything that related to Debian. Sorry if this is a common question. Apr 17, 2019 at 8:26
  • 1
    @GAD3R the two questions are different and have value separately IMO. The answers would be different. Apr 17, 2019 at 8:47

2 Answers 2

5

Run

apt-cdrom add

as root (or using sudo), and follow the prompts – it will ask you to insert a disk, then scan it and add the relevant information to /etc/apt/sources.list. You will then be able to install packages from it as usual.

0
3

In your /etc/apt/sources.list you will have an entry like this for the first DVD after installation:

deb cdrom:[Debian GNU/Linux 9.8.0 "Stretch" - Official amd64 DVD Binary-1 20190216-11:59]/ stretch contrib main

This line is used to tell apt to use the cdrom as a package source. The second and third DVD should be "Binary-2" and "Binary-3". The complete string can be found on the DVD in the file .disk/info.

If you only have the ISO files and no (virtual) optical drive is available, you can mount the images manually and add a deb file: source to /etc/apt/sources.list.

See How to use a .iso image as a CD-ROM Repository?

3
  • Thanks a lot. I really appreciate it. Apr 17, 2019 at 9:02
  • I can't edit this file, I can't login as root. What should I do? Online solutions say to use sudo but sudo opens the file in terminal, and doesn't let me save. Apr 17, 2019 at 9:22
  • Use su or su - in terminal, then edit the file with your favourite editor.
    – Freddy
    Apr 17, 2019 at 9:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .