Arduino Playground is read-only starting December 31st, 2018. For more info please look at this Forum Post

Installing Arduino on Linux (Debian and Ubuntu?)

WARNING!!! If you use sudo apt-get install arduino you will probably get an extremely outdated and possibly non-standard version of the Arduino IDE. Official Linux 32 bit, 64 bit, and ARM builds are available for download here: https://www.arduino.cc/en/Main/Software

You can find official Linux installation instructions here: https://www.arduino.cc/en/Guide/Linux

Some of the information you will find in the following page may be outdated:

From Riereta.net (edited by candela and acracia).

You should use the Ubuntu, Debian or Gentoo instructions instead. These are just here as they might have useful alternatives to try if those other instructions don't work.

For more information see this forum thread.

1. apt-get install subversion

2. getting arduino package sources: download the latest version of arduino cvs with subversion: ~/ svn checkout svn://svn.berlios.de/arduino/trunk we will come back to this directory later

3. apt-get install gcc-avr avr-libc jikes uisp

4. install jre*your version_number* (java.com) de http://www.java.com/es/download/manual.jsp and put it into the /usr/lib firectory

5. install rxtx for Java: - - - - - - - - Installing RXTX First, obtain the RXTX binaries package with CommAPI from: http://www.rxtx.org/ take the latest version for linux Decompress and Untar this package: ~/ cp gunzip rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz ~/tar xf rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz At this point, you'll have an rxtx-2.1-7pre17-i686-pc-linux-gnu directory. Next, you'll need to copy the shared objects into your java installation: ~/cp rxtx-2.1-7pre17-i686-pc-linux-gnu/librxtxParallel.so /usr/lib/jre*your version_number*/lib/i386 ~/cp rxtx-2.1-7pre17-i686-pc-linux-gnu/librxtxSerial.so /usr/lib/jre*your version_number*/lib/i386 If you are installing on an architecture other than an x86, you'll need to adjust both the /i386-pc-linux/ and the /i386/ accordingly.

Next, you'll need to install the RXTXcomm.jar file:

~/cp rxtx-2.1-7pre17-i686-pc-linux-gnu/RXTXcomm.jar /usr/lib/jre*your version_number*/lib/ext/

At this point, the RXTX installation is complete.

We are almost finished. We just need to create the properties file that the Comm API will use to load the drivers (.so files). To create this file, type the following command:

~//bin/echo Driver=gnu.io.RXTXCommDriver > /usr/lib/jre*your version_number*/lib/javax.comm.properties o ~//bin/echo Driver=gnu.io.RXTXCommDriver > /usr/lib/j2se/1.4/jre/lib/javax.comm.properties

~/ln -s /dev/ttyUSB0 /dev/ttyS99

If you don't have the /dev/ttyUSB0, do

~/ modprobe ftdi_sio

If you don't have it, then you have to give to your kernel support to usbhid and libftdi.

Device Drivers ---> USB support ---> USB Serial Converter support ---> USB FTDI Single Port Serial Driver (EXPERIMENTAL)

Congratulations! You have installed the Linux Comm API. - - - - - - -

6. add the path to java/bin and rt.jar to your CLASSPATH: in my case this looks like:

export CLASSPATH=/usr/lib/jreyour_version_number/bin:/usr/lib/jreyour_version_number/lib/rt.jar

7. you can check on this variables with the "env" command note that as soon as you close your xterm this settings are gone. for a tutorial on environment variables look at: http://www.dynamic-apps.com/tutorials/classpath.jsp

8. go back to arduino svn directory:

~/ cd to trunk/build/linux

9. compile it:

~/ ./make.sh

10. go to work directory

~/ cd work

11. create binaries directory

~/ mkdir -p tools/avr/bin/

12. create symbolic links to the programs arduino uses to compile

~/ cd tools/avr/bin/

~/ ln -s /usr/bin/avr-gcc avr-gcc ; ln -s /usr/bin/avr-objcopy avr-objcopy ; ln -s /usr/bin/avr-objdump avr-objdump ; ln -s /usr/bin/avr-size avr-size ; ln -s /usr/bin/uisp uisp ;

13. go back to /trunk/build/linux/ folder

~/ cd ../../../../

Per executar arduino

~/ ./run.sh

14. for having the comm.api driver always properly set, change your bash configuration file:

~/ vi /root/.bashrc

and add

/bin/echo Driver=gnu.io.RXTXCommDriver > /usr/lib/jre*your version_number*/lib/javax.comm.properties