Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

I want to execute a java program inside my debootstrap-chroot on an ubuntu machine for which I need to have java installed inside the chroot jail. I tried to install it using :

 apt-get install openjdk-6-jdk

but it gives an error:

"perl: warning: Setting locale failed"

How can I fix this ? or is there a better way ?

share|improve this question

migrated from Aug 16 '12 at 22:49

This question came from our site for professional and enthusiast programmers.

I got this solved , you just need to mount the /proc filesystem inside the chroot :

sudo mount -o bind /proc /chroot/proc

then inside chroot , install java

#install java
apt-get install oracle-java7-installer
share|improve this answer

Your Answer


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