0

I have recently installed Debian 8.1 onto my hard disk with an iso image burned to DVD-r. I was trying to install g++ from the terminal when it asked me to insert the dvd from which I installed the OS onto my hard disk before continuing. This, being my first concern, raises my second concern even more. But more detail on the first concern; it didn't work. I inserted the cd, and it gave me a very large error message. I tried apt-get update, but it gave me the same error. I get this error whenever I try to install anything with apt-get install and put in the dvd as it asks. That error is:

Reading package lists... Done Building dependency tree
Reading state information... Done The following extra packages will be installed: binutils g++-4.9 gcc gcc-4.9 libasan1 libatomic1 libc-dev-bin libc6-dev libcilkrts5 libgcc-4.9-dev libitm1 liblsan0 libstdc++-4.9-dev libtsan0 libubsan0 linux-libc-dev manpages-dev Suggested packages: binutils-doc g++-multilib g++-4.9-multilib gcc-4.9-doc libstdc++6-4.9-dbg gcc-multilib make autoconf automake libtool flex bison gdb gcc-doc gcc-4.9-multilib gcc-4.9-locales libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan1-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libquadmath0-dbg glibc-doc libstdc++-4.9-doc The following NEW packages will be installed: binutils g++ g++-4.9 gcc gcc-4.9 libasan1 libatomic1 libc-dev-bin libc6-dev libcilkrts5 libgcc-4.9-dev libitm1 liblsan0 libstdc++-4.9-dev libtsan0 libubsan0 linux-libc-dev manpages-dev 0 upgraded, 18 newly installed, 0 to remove and 92 not upgraded. Need to get 1,008 kB/39.2 MB of archives. After this operation, 116 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://security.debian.org/ jessie/updates/main linux-libc-dev amd64 3.16.7-ckt20-1+deb8u3 [1,008 kB] Err cdrom://[Debian GNU/Linux 8.2.0 Jessie - Official amd64 DVD Binary-1 20150906-11:13]/ jessie/main manpages-dev all 3.74-1 Read error - read (5: Input/output error) Fetched 1,008 kB in 11s (85.8 kB/s)
E: Failed to fetch cdrom://[Debian GNU/Linux 8.2.0 Jessie - Official amd64 DVD Binary-1 20150906-11:13]/pool/main/b/binutils/binutils_2.25-5_amd64.deb Hash Sum mismatch

E: Failed to fetch cdrom://[Debian GNU/Linux 8.2.0 Jessie - Official amd64 DVD Binary-1 20150906-11:13]/pool/main/m/manpages/manpages-dev_3.74-1_all.deb Read error - read (5: Input/output error)

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

My second concern, seeing as this whole dvd thing happened, is whether or not I can actually boot into Debian after shutting off my computer without the DVD in. Will that work? Will it automatically boot into Debian if I shut off my computer and turn it back on? I'm afraid to turn off my computer because my god did I struggle to get this working on my laptop in the first place (Lenovo is not GNU/Linux friendly).

  • Also, I'm dual booting with Windows 8.1 – Mars Jan 23 '16 at 4:47
0

Your problem is that APT is configured to look for packages in the Debian DVD set.

edit your sources.list file, make sure that any lines containing cdrom are either removed or commented.

Editing sources.list file

# vi /etc/apt/sources.list

or

# gksu gedit /etc/apt/sources.list

so your sources.list file will look something like this

 deb cdrom:[Debian GNU/Linux 8 _Jessie_ - Official Snapshot amd64 LIVE/INSTALL Binary 20150908-22:01]/ jessie main

 deb cdrom:[Debian GNU/Linux 8 _Jessie_ - Official Snapshot amd64 LIVE/INSTALL Binary 20150908-22:01]/ jessie main

deb http://httpredir.debian.org/debian/ jessie main 
deb-src http://httpredir.debian.org/debian/ jessie main

deb http://security.debian.org/ jessie/updates main contrib
deb-src http://security.debian.org/ jessie/updates main contrib 

# jessie-updates, previously known as 'volatile'
deb http://httpredir.debian.org/debian/ jessie-updates main 
deb-src http://httpredir.debian.org/debian/ jessie-updates main

now comment the culprit lines:

# deb cdrom:[Debian GNU/Linux 8 _Jessie_ - Official Snapshot amd64 LIVE/INSTALL Binary 20150908-22:01]/ jessie main

# deb cdrom:[Debian GNU/Linux 8 _Jessie_ - Official Snapshot amd64 LIVE/INSTALL Binary 20150908-22:01]/ jessie main

deb http://httpredir.debian.org/debian/ jessie main contrib non-free
deb-src http://httpredir.debian.org/debian/ jessie main contrib non-free

...

or remove them:

deb http://httpredir.debian.org/debian/ jessie main contrib non-free
deb-src http://httpredir.debian.org/debian/ jessie main contrib non-free

...

Note that I've added 'contrib' and 'non-free' repositories. this is needed, for example, if you want decent graphics acceleration, gcc-doc package installed for all archs, etc. AMD and nVidia propietary drivers are included in non-free repos, and some GCC manpages are considered non free by Debian because the GFDL (GNU Free Document License) is incompatible with DFSG (Debian Free Sotware Guidelines).

Now, about your second concern, I think it all will go well if you installed GRUB2 to the MBR of the first drive, however, just to be sure, run this command as root.

# update-grub

if you see all of your operating systems listed in the output, we're sweet.

  • Oh hey, forgot about this question. Got it solved a little bit after asking, been running Debian ever since. I'll refer to this if I ever have a similar problem though, thanks. – Mars Jun 1 '16 at 23:05
  • well I'm glad you solved. I kinda figure that out when I finally saw that beautiful string that states that this question were asked 4 months ago, I really should pay more attention to the site UI, LOL!. and yup, let's leave this Q/A here in case you or anyone else trample into the same problem. – Jenny T-Type Jun 1 '16 at 23:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.