Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have Oracle/Sun JDK 7 installed and alternatives setup. When I try to install Arduino IDE, it says

$ sudo apt-get install arduino
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  ax25-node libax25 openbsd-inetd
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  ca-certificates-java default-jre default-jre-headless extra-xdg-menus icedtea-7-jre-jamvm java-common libatk-wrapper-java libatk-wrapper-java-jni libjna-java
  openjdk-7-jre openjdk-7-jre-headless openjdk-7-jre-lib ttf-dejavu-extra tzdata-java
Suggested packages:
  equivs libjna-java-doc icedtea-7-plugin sun-java6-fonts fonts-ipafont-gothic fonts-ipafont-mincho ttf-telugu-fonts ttf-oriya-fonts ttf-kannada-fonts ttf-bengali-fonts
The following NEW packages will be installed:
  arduino ca-certificates-java default-jre default-jre-headless extra-xdg-menus icedtea-7-jre-jamvm java-common libatk-wrapper-java libatk-wrapper-java-jni libjna-java
  openjdk-7-jre openjdk-7-jre-headless openjdk-7-jre-lib ttf-dejavu-extra tzdata-java
0 upgraded, 15 newly installed, 0 to remove and 61 not upgraded.
Need to get 45.4 MB of archives.
After this operation, 68.2 MB of additional disk space will be used.
Do you want to continue [Y/n]? n
Abort.

I do not know how to solve this. I do not want another JDK/JRE installed. Any help is appreciated.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

The package arduino deppends of default-jre, which depends of opedjdk-7-jre:

apt-cache depends arduino default-jre
arduino
 |Depends: default-jre
  Depends: <java6-runtime>
    openjdk-6-jre
    default-jre
    openjdk-7-jre
  Depends: libjna-java
  Depends: librxtx-java
  Depends: arduino-core
  Recommends: extra-xdg-menus
  Recommends: policykit-1
default-jre
  Depends: default-jre-headless
  Depends: openjdk-7-jre

Hence, you are doomed to use openjdk.

share|improve this answer

So its simple.. First remove your existing java packages then clean your system, and then try installing again..

These steps would solve your issue, run it in a series.:

  • Removing java and all dependent packages.

    sudo apt-get autoremove
    sudo apt-get autoclean
    sudo apt-get --purge remove openjdk-7*
    sudo apt-get autoremove openjdk-7*
    sudo apt-get autoclean
    sudo apt-get autoremove
    sudo apt-get update
    sudo apt-get -f install
    
  • Then finally install arduino

    sudo apt-get install arduino
    

Reply if something goes wrong..

share|improve this answer

Your Answer

 
discard

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.