You almost take it for granted that an open source products work together seamlessly, but getting Arduino development to work on CentOS 5 is a pretty difficult undertaking.
If you want the easy way out, go to CentOS 6. CentOS 5 came out in 2007 and back then Arduino was only 2 years old, so getting support for something two years old is a bit risky for a Linux distribution that is supposed to have some stability.
If you hell bent on CentOS 5 and have it in 64bit then you can download RPMs already build by blogger Philip and his site
http://utlw.blogspot.com/2011/08/arduino-on-centos-5.html
Need to give props where props are due, his site gave me hints of where to go to resolve me problems.
So if you are still here, I guess you are willing to go through the pain of installing Arduino Developement kit on CentOS5.
First off, you need a starting point, everyone builds their machines their own way, here is mine for this project
http://www.apolonio.com/node/22
Next is a link to the official site (I think its official)
http://arduino.cc/playground/Linux/All
The first line is so important
First of all, install sun-java, avr-gcc (aka "gcc-avr"), avr-gcc-c++, avr-libc.
I just installed the stock Java (which works) and ignored these instructions just went and installed arduino 1.0, it launched, but I could not compile because I did not have avr-gcc.
It took hours, but I finally figured out how to install avr-gcc, it worked but failed compiling because I was missing avr-libc.
So, in attempt to contribute back to the open source world, I give you these instructions.
The end goal is to be able to run the blink program on the board.
Install Java
This is the easiest, you can do this using yum
yum -y install java
Done
Install avr-gcc and avr-gcc-c++
Before you start you should create the user mockbuild (not required but gets rid of build warnings) and change to the /usr/src directory.
This requires several packages to be downloaded, compiled and installed. The source rpms are actually decompressed and installed because for some reason there is an MD5 checksum error I have not been able to identify why. These are the packages that need to be installed and in that order.
The first four packages require four steps each, the last two are combined into the same four steps. The steps are basically
Once you have the binary RPM (which will be in /usr/src/redhat/RPMS/i386) you can copy them to a USB or network share so you don't have to download and compile later.
These steps assume you are in the /usr/src directory
gmp 4.3.2
Required by the other packages so it needs to go first, there is a 4.3.1 version out there that does not work with the upcoming packages.
mpfr 3.0.0
libmpc 0.9.1
avr-binutils 2.20-2
avr-gcc-4.6.1 and avr-gcc-c++-4.6.1
Install avr-libc 1.7
As of this writing 1.8 exists but I had problems with it so I dropped to the version available right before this which is avr-libc-1.7.2rc2252.tar.bz2. These steps do not produce and RPM, the source RPMs I have found had some dependencies that were a pain. I hit a point where I just decided to install from source. Hopefully in the future I will produce steps to build the RPM.
For now the steps are download, decompress, configure, build, install
Install Arduino
There is no compile step here, simply download and unroll. It can go in /usr/local or /opt or even some custom directory you want. I choose the /opt
One More Thing
Sorry, I know it seems like you are done, but the version of avrdude, which is used to upload code to the microcontroller, does not work with the glibc version that came with arduino.
So you will have to download, configure, build, and replace the version of avrdude that came with the arduino software.
Final Note
At this point you should be able to compile and upload code but as root. Also you may not like the java IDE, there are solutions online to run as a normal user and to use the plain CLI for coding. I will be working on my own docs in the future, for now, I am playing with what I got.
More Reading
Cut and Paste Goodness - Like to copy and paste into a putty window? Go here, some may consider this the quick start option.
PreCompiled Install - Here is a page to make it super easy to install Arduino on CentOS 5 32bit.
Arduino Downloads - Page of MD5 sums and links to the original source as of this writing.
Originally published January 22, 2012 by Larry Apolonio
Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer