Fixing Arduino on Ubuntu 9.10 Karmic x64 with librxtx-java
At present serial communication from the Arduino IDE will not work with the default installation as the IDE is supplied with a 32 bit version of the serial communication library rxtx and as yet the version in the repos doesn’t work either.
A full distribution of the arduino-0017 ide can be downloaded here with the correct files included.
If you haven’t used arduino before you’ll need to install its dependencies by running
sudo apt-get install avr-libc gcc-avr avrdude
To fix an existing installation – a working version of rxtx (rxtx-2.2pre2-bins.zip) can be downloaded from http://rxtx.qbang.org/ however at the time of writing the site had been down for a while so I’ve provided a mirror of the file (here).
To install:
Extract /RXTXcomm.jar and /x86_64-unknown-linux-gnu/librxtxSerial.xo into the ardunio/lib directory overwriting the previous versions.
Arduino serial communication should now work as normal.
For people having more general problems with any application using librxtx-java on 64 bit ubuntu I have created an updated .deb file – available here. This can be also used to fix arduino if the librxtxSerial.so file is removed from the arduino/lib directory.
The source code for rxtx can be found here
Tags: 64 bit, arduino, karmic, linux, rxtx, ubuntu

I downloaded the full distribution and it worked perfectly! Thank you Oliver!
The next issue is getting the AVRISP MkII to work properly. It looks like its a permission thing with the USB. The work around is to open a terminal and go to the Arduino folder. Run it as:
gksudo ./arduino and the programmer works fine.
I downloaded the full distribution,
and i still getting errors.
So I tried replacing the RXTX.jar
and the librxtxSerial.so files as stated above.
Still getting errors, i can get the ide to run and compile, just can’t upload to my arduino.
Using Ubuntu 9.10.
The errors say ‘can’t run program avrdude’
then goes onto list a bunch of .jar exceptions to long to list.
This all works fine on windows
Did you install the dependencies, arduino requires you to install sudo avr-libc avr-gcc and avrdude before it will work by doing
sudo apt-get install avr-libc gcc-avr avrdudeI’ll update the post
Worked like a charm. Thank you very much for your work.
Dosen’t work!!!! Ahhhhh
Ah, I see, if I read the instructions and do what it tells me, rather than boy read half the instructions!
Great works a treat
Fantastic thanks for this.
One thing, you can run ‘./arduino’ as an ordinary user (not root) if you add yourself to the tty group. I believe you need to be in the dialout group as well, but I found that I was in it already. If you run the ‘./arduino’ IDE as a plain user without it, it will work the first time, but further uploads will hang complaining about a lock, and ttyUSB0 will disappear.
Thanks for your work! Anyone else having problems with the latest kernel update (2.6.31-18)? I had to revert to 2.6.31-17 to get my arduino back working.
Is this under 9.10, the latest provided kernel still seems to be 2.6.31-17
If you activate the proposed repositories (karmic-proposed), you’ll get 2.6.31-18. Maybe this will be fixed once the kernel update finds its way into the default repositories. For now, it seems to be a good idea not to get the “proposed” stuff.
I assume you’ve filed a bug on launchpad!
It’s hard to reproduce the bug. The standard examples (LED blinking etc) work fine. Seems like Serial.available() works unreliably in my scripts on 2.6.31-18, whereas I’ve never had problems with earlier versions. I’ll try to put together a reproducible bug sample before filing something on launchpad.
I’ve had problems with various FTDI USB serial devices under Ubuntu 9.10.
I found that a power management driver is configured to recognise a wide range of Ftdi parts as belonging to a ‘Watts Up’ power meter. This can cause the driver to hold the device open, requiring the arduino user to be superuser to get the port.
I have reported this as a bug,
https://bugs.launchpad.net/ubuntu/+source/devicekit-power/+bug/507247
but the workaround is to rename /lib/udev/rules.d/95-devkit-power-wup.rules as 95-devkit-power-wup.rules.DISABLED.
If you actually own a Watts-Up meter, edit that file to distinguish between the FTDI chip in the power meter and the one in your arduino.
Thanks a lot dude!
Hi,
I installed avr-libc, gcc-avr and avrdude packages, then I imported in my Ubuntu 9.10 64bit linux box the Arduino-0018 PPA found at https://launchpad.net/~arduino-ubuntu-team/+archive/ppa, as indicated in the instructions present in the http://www.arduino.cc/playground/Linux/Ubuntu.
Finally I downloaded and installed
librxtx-java_2.2pre2_amd64.deb, but when I run arduino command in a shell, I get the following error:
/usr/lib/gio/modules/libgvfsdbus.so: wrong ELF class: ELFCLASS64
Failed to load module: /usr/lib/gio/modules/libgvfsdbus.so
/usr/lib/gio/modules/libgioremote-volume-monitor.so: wrong ELF class: ELFCLASS64
Failed to load module: /usr/lib/gio/modules/libgioremote-volume-monitor.so
/usr/lib/gio/modules/libgiogconf.so: wrong ELF class: ELFCLASS64
Failed to load module: /usr/lib/gio/modules/libgiogconf.so
and then also:
java.lang.UnsatisfiedLinkError:
/usr/lib/librxtxSerial.so: /usr/lib/librxtxSerial.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch) thrown while loading gnu.io.RXTXCommDriver
Exception in thread “main” java.lang.UnsatisfiedLinkError: /usr/lib/librxtxSerial.so: /usr/lib/librxtxSerial.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1703)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1028)
at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:123)
at processing.app.Editor.populateSerialMenu(Editor.java:965)
at processing.app.Editor.buildToolsMenu(Editor.java:717)
at processing.app.Editor.buildMenuBar(Editor.java:502)
at processing.app.Editor.(Editor.java:194)
at processing.app.Base.handleOpen(Base.java:698)
at processing.app.Base.handleOpen(Base.java:663)
at processing.app.Base.handleNew(Base.java:578)
at processing.app.Base.(Base.java:318)
at processing.app.Base.main(Base.java:207)
Where do you think I’m wrong?
Thanks in advance for you help.
To be honest you’re probably trying to fix a problem that doesn’t exist any more, as far as I know the current 64bit linux version of the arduino IDE works ok without additional tinkering. This was more aimed at the last version (0017) and before some packages were updated in ubuntu. I’ve not tried using the PPA you mention so I can’t really advise on that. You might wanna try the arduino.cc forums if you continue having troubles.
Hi,
the problem I wrote was due to a wrong sun-java6-jre package: I used the 32 bit version on a 64 bit ubuntu karmic. I purged the 32 bit version of sun-java6-jre package and installed again the correct one.
Now all things seem to be right.
hi
the 64bit lib from rxtx works like a charm. thanks
Hi everyone.. i am using Ubuntu 9.10 i686..32-bit and jdk version java-6-sun-1.6.0.16. i have installed the rxtx jar n the required file in ext and lib folders resp of jdk. The rxtx version i used is rxtx-2.1-7-bins-r2. The issue with my application is i m not getting any values in CommPortIdentifier.getPortIdentifiers() method & not getting any error also. i even explicitly added System.setProperty(“gnu.io.rxtx.SerialPorts”, “/dev/ttyACM0″); But yet no succcess !! I m tired of tryin everythin.. Can anyone point out the mistake.. Am i using a wrong version of rxtx or so..
Works perfectly in ubuntu 10.04 ultimate 64bit.
Am using latest arduino 0019