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 am installing Grails on 12.10, using the instructions on, but am getting an error on the 3rd step, as outlined below.

 sudo add-apt-repository ppa:groovy-dev/grails  
 sudo apt-get update
 sudo apt-get install grails-ppa

The error I get is shown below. I have the Sun JDK installed, and JAVA_HOME is set, and JAVA_HOME/bin is on the path.

Can someone suggest things to try to resolve this?

sudo apt-get install grails-ppa
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 default-jre-headless:i386 : Depends: openjdk-7-jre-headless:i386 (>= 7~u3-2.1) but it is not going to be installed
 openjdk-7-jre:i386 : Depends: openjdk-7-jre-headless:i386 (= 7u7-2.3.2a-1ubuntu1) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

java -version
java version "1.6.0_39"
Java(TM) SE Runtime Environment (build 1.6.0_39-b04)
Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01, mixed mode)
share|improve this question
try these commands : sudo apt-get purge java* && sudo add-apt-repository ppa:webupd8team/java && sudo apt-get update && sudo apt-get install oracle-java7-installer – Anam Ahmed Mar 16 '13 at 17:15

Do you have a particular reason to have the Sun JDK installed instead of the default? If not, remove it and go with the default, as apt-get suggests.

After uninstalling the 'Sun JDK', the command apt-get install grails-ppa should pull in the default JDK automatically. If it doesn't, install it explicitly using apt-get install default-jre-headless grails-ppa.

share|improve this answer

Your Answer


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

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