Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to install Oracle Java on Debian Wheezy with make-jpkg and fakeroot?

the manual for installing oracle java on debian wheezy is quite clear and understandable:

  • download jdk-7u21-linux-x64.tar.gz from oracle
  • install the java-package
  • run make-jpkg with jdk-7u21-linux-x64.tar.gz

as root running:

make-jpkg jdk-7u21-linux-x64.tar.gz fakeroot make-jpkg jdk-7u21-linux-x64.tar.gz

results in the following error:

You are real root -- unfortunately, some Java distributions have install scripts that directly manipulate /etc, and may cause some inconsistencies on your system. Instead, you should become a non-root user and run:

fakeroot make-jpkg jdk-7u21-linux-x64.tar.gz

which will allow no damage to be done to your system files and still permit the Java distribution to successfully extract.


as normal user running:

make-jpkg jdk-7u21-linux-x64.tar.gz fakeroot make-jpkg jdk-7u21-linux-x64.tar.gz

results both in an warning/error wall.

some of the errors:

dpkg-shlibdeps: warning: Can't extract name and version from library name `'
error: couldn't find library needed by /tmp/make-jpkg.MxvYKHyE3L/install/usr/lib/jvm/j2sdk1.7-oracle/jre/lib/amd64/ (ELF format: 'elf64-x86-64'; RPATH: '')
dpkg-gencontrol: warning: Depends field of package oracle-j2sdk1.7: unknown substitution variable ${shlibs:Depends}
dpkg-shlibdeps: error: cannot continue due to the errors listed above

full output: without fakeroot

with fakeroot

installing works fine:

dpkg -i oracle-j2sdk1.7_1.7.0+update21_amd64.deb

java version:

java -version
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)

are the error safe to ignore?

share|improve this question
Do you have java-package installed? – Andrea de Palo Jul 20 '15 at 12:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.