Ubuntu 9.4 and Arduino

Just got my first Duemilanove board and I have no problems using it with Win XP Pro on my work’s laptop (I have 2 stepper motors running). BUT on my Linux box i get a dialog asking for the sketch file location then nothing.

I have removed brltty (thanks Ladyada)

When I open the Arduino S/W in a terminal I get…

java.lang.UnsatisfiedLinkError: /home/matt/Downloads/arduino-0016/lib/librxtxSerial.so: /home/matt/Downloads/arduino-0016/lib/librxtxSerial.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch) thrown while loading gnu.io.RXTXCommDriver
Exception in thread “main” java.lang.UnsatisfiedLinkError: /home/matt/Downloads/arduino-0016/lib/librxtxSerial.so: /home/matt/Downloads/arduino-0016/lib/librxtxSerial.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1767)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1692)
at java.lang.Runtime.loadLibrary0(Runtime.java:840)
at java.lang.System.loadLibrary(System.java:1047)
at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83)
at processing.app.Editor.populateSerialMenu(Editor.java:915)
at processing.app.Editor.buildToolsMenu(Editor.java:812)
at processing.app.Editor.(Editor.java:190)
at processing.app.Base.(Base.java:137)
at processing.app.Base.main(Base.java:104)

As a Linux newbe I am out of my depth here. I really want to use Linux and keep the works PC free of my hobby.

Chewie B

First question, do you have Sun Java Runtime Environment installed?

The native one on the Ubuntu install (gjc) had to be replaced with the Sun version on my 8.04 install, some twiddle fidget done to tell everything that this is the new version to use (so you don't end up having Open Office uninstall because of dependencies, and then remove the Ubuntu installed version (gjc).

This sounds suspiciously like a 64-bit O/S problem:wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch) thrown while loading gnu.io.RXTXCommDriver
I don't have a solution for you but maybe this will point you in the right direction.

RuggedCircuits :- Thanks I also thought that but that gets me no further.

capt.tagon :- sorry more questions.

  1. Can that be done from the add/remove application built into Ubuntu 9.4 ?
  2. What do I remove ?
  3. I assume I get the Sun Java Runtime Environment from the Sun site not via the add/remove application.

Chewie B

On all this I include the term I really hate to hear, use, or have wielded against me :-X → YMMV

But then we’re using Linux and Linux is mostly about experimentation and taking chances.

I’m not sure how 9.4 is laid out on the Add/Remove, but if you’re using the Gnome interface, under the System dropdown menu you find the Administration submenu. The two items we’re interested in are the Synaptic Packet Manager and Software Sources.

Start up Software Sources, and on the Ubuntu Software, check all the checkboxes. We’re primarily interested in getting Software restricted by copyright or legal issues (Multiverse), but having them all kind of opens up your software world.

Now open Synaptic Package Manager and search for “sun java”. The results window should give you sun-java6-jre, sun-java5-jre. I’m currently running the Java 6 JRE on my system for Arduino 0016. When you select it, it will also select all dependent packages for install. The Apply button finishes out the operation.

From here, things get a little hazy as I got the final stuff working late one night and don’t remember all the steps, but now with Sun JRE installed, just try starting up the Arduino IDE and see what messages it gives you.

On older versions of Ubuntu, the Gnu Java has issues when loaded beside Sun Java, here’s hoping that 9.4 has fixed that. On 8.04, if it gives you problems, the Arduino Playground recommends the following:

Problems Ubuntu 8.04 386

An exception like:

java.lang.ClassNotFoundException: com.sun.java.swing.plaf.gtk.GTKLookAndFeel not found in
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=, parent=null}}
at java.net.URLClassLoader.findClass(libgcj.so.81)
at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.81)
at java.lang.ClassLoader.loadClass(libgcj.so.81)
at java.lang.ClassLoader.loadClass(libgcj.so.81)
at java.lang.Class.forName(libgcj.so.81)
at javax.swing.UIManager.setLookAndFeel(libgcj.so.81)
at processing.app.Base.(Base.java:131)
at processing.app.Base.main(Base.java:104)

Means gcj is not working right for you. Try uninstalling it and its dependencies but keep your jre installed.

  1. You should have noted, that you're running 64 bit Ubuntu.
  2. You should have searched the forum.

In a few words:

  1. sudo apt-get install sun-java6-jre
  2. sudo apt-get install librxtx-java
  3. rm /home/matt/Downloads/arduino-0016/lib/librxtxSerial.so

Lachezar Dobrev :- Thanks I now have the up and running :slight_smile:

I would like to point out I did search the forum but being a Linux noob didn’t help. Again thanks for your patients.

Now I just have to get the compiler working … :-[ I think it is an install issue.

Chewie B