3

I am installing Grails on 12.10, using the instructions on grails.org, 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)
guntbert
  • 13,134
EdgeCase
  • 476
  • 1
  • 8
  • 19
  • 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

1 Answers1

0

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.

zwets
  • 12,354