1

I'm a Debian newbie and trying to install JDK on my new OS, receiving the following error: Please insert the disk labeled: Debian GNU/Linux 7.8.0 Wheezy - Official amd64 DVD Binary-1 20150110-14:43 in drive /media/cdrom/

I am using the following commands: apt-get update + apt-get install default-jdk

I searched for the requested file but with no success but with no luck. I'd be happy to get an explanation to this error and where can I find the requested file. The OS is installed as a Virtual Box guest.

/etc/apt/sources.list:

#

# deb cdrom:[Debian GNU/Linux 7.8.0 _Wheezy_ - Official amd64 DVD Binary-1 20150110-14:43]/ wheezy contrib main

deb cdrom:[Debian GNU/Linux 7.8.0 _Wheezy_ - Official amd64 DVD Binary-1 20150110-14:43]/ wheezy contrib main

deb http://debian.co.il/debian/ wheezy main
deb-src http://debian.co.il/debian/ wheezy main

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

# wheezy-updates, previously known as 'volatile'
deb http://debian.co.il/debian/ wheezy-updates main contrib
deb-src http://debian.co.il/debian/ wheezy-updates main contrib
4
  • Most likely you have to remove your cdrom from the /etc/apt/sources.list file. Show us the contents of this file.
    – VGe0rge
    Feb 15, 2015 at 13:32
  • @VGe0rge, I copied the file content to the main message.
    – Ravit
    Feb 15, 2015 at 13:55
  • Questions about software installation are off-topic. This site is for programming questions.
    – Stephen C
    Feb 15, 2015 at 13:58
  • First of all StephenC is right, the most suitable place for this kind of questions is Serverfault. The answer of k0staa is for installing the oracle jdk (and it will actually not work) , if you want the default jdk (openjdk) you could only remove the line "deb cdrom...." and do the update.
    – VGe0rge
    Feb 15, 2015 at 14:25

2 Answers 2

0
  1. You need to delete the following line:
    deb cdrom:[Debian GNU/Linux 7.8.0 _Wheezy_ - Official amd64 DVD Binary-1 20150110-14:43]/ wheezy contrib main

  2. Then update apt:
    $ sudo apt-get update && sudo apt-get dist-upgrade

  3. Now you should be good to install.

-1

Open /etc/apt/sources.list (as a root or super user) You need to remove second from two first lines(leave just this one mark with '#') :

# deb cdrom:[Debian GNU/Linux 7.8.0 _Wheezy_ - Official amd64 DVD Binary-1 20150110-14:43]/ wheezy contrib main

and add this lines to the end of the file:

deb http://ppa.launchpad.net/webupd8team/java/ubuntu wheezy main
deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu wheezy main

After you save the file and exit you need to run this command (adding repo keys):

apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886

And this one:

apt-get update

Now you are ready to install java, for exemple:

apt-get install oracle-java7-installer oracle-java7-set-default
3
  • 1
    There is no need to add a ppa for the user to install the default jdk. Especially not a non-Debian repository which isn't maintained by the debian-security team
    – Martin
    Feb 15, 2015 at 14:26
  • I dont think that there is a default jdk repository anymore. I think there is only Open JDK (repo name: default-jdk). But if I'm wrong please just give instructions. I'dont use debian anymore.
    – k0staa
    Feb 15, 2015 at 19:29
  • default-jdk is a meta package which depends on the openjdk-6-jdk, but openjdk-7-jdk is also available. packages.debian.org/wheezy/default-jdk
    – Martin
    Feb 15, 2015 at 20:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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