Hi all. Im an ArduiNoob here. I have been trying to get my system to run some code written by TinHead over at LetsMakeRobots.com. I was getting compile errors due to avr/c++ library references. Anyways, I never did get that problem fixed. I switched gears and started working on a simpler robot that me and my 9 year old brother could build. Basically, I have things messed up to a point where arduino cannot ever compile the simplest code. I am getting the error:
In file included from blinkLED.cpp:2:0:
/home/josh/arduino-0022/hardware/arduino/cores/arduino/WProgram.h:4
:20: fatal error: stdlib.h: No such file or directory
compilation terminated.
I am running Ubuntu 10.10 and Arduino 22, both 64 bit. I know the problem stems from me installing jre, avr-g++ and c++ because it was working fine (with the exception of the aforementioned Valkyrie code written by TinHead) until then. Basically, I just want to wipe out jre, avr-g++, c++ and arduino, then reinstall with a clean slate. I don't know how to do this though. Please help! (my brother is getting impatient).
Is there a way to specify using aptitude that I want to use version 22? When using apt-get, synaptic or ubuntu software updater, it always installs version 18
The last time I did it I used the following instructions:
Download version 0022 from:
// it downloaded to my /home/mark/Downloads directory
// open terminal from ubuntu menu
Applications->Accessories->Terminal
// go to downloads directory
cd ~/Downloads
// untar the downloaded file
tar -vxzf arduino-0022.tgz
// change directory to replace librxtxSerial library
cd arduino-0022/lib
// backup original lib
mv librxtxSerial.so librxtxSerial.so.orig
//find librxtxSerial library that works for this system
find / -ls 2>&1 | grep -i librxtxSerial
if librxtSerial library is not found somewhere in a /usr/lib subdirectory
// this will require root password
sudo apt-get install arduino
// rerun the find command
else
// found it in /usr/lib/jni
// copy it to arduino-0022/lib directory
cp /usr/lib/jni/librxtxSerial.so .
Ok... I have reinstalled and also followed the steps in your last post after the reinstall. Same error message. I think it is looking for C librarys that are not where they belong. I was following a walk through that had me installing things (avr, jre and c++) in the home directory. As I stated before, I think it just needs to all be uninstalled and then reinstalled. Unfortunately, I am not very familiar with linux.
josh@Satellite-A215:~$ sudo apt-get install --reinstall avr-gcc-c++
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package avr-gcc-c+
E: Couldn't find any package by regex 'avr-gcc-c+'
josh@Satellite-A215:~$ sudo apt-get install --reinstall avr-gcc
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package avr-gcc
josh@Satellite-A215:~$
The 3rd one installed fine, then....
josh@Satellite-A215:~$ sudo apt-get install --reinstall sun-java6-jre
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package sun-java6-jre is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'sun-java6-jre' has no installation candidate
josh@Satellite-A215:~$ sudo apt-get install sun-java6-jre
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package sun-java6-jre is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'sun-java6-jre' has no installation candidate
josh@Satellite-A215:~$
Alright, I've done everything suggested, but am now getting the following error:
In file included from
/home/josh/Downloads/arduino-0021/hardware/arduino/cores/arduino/wiring.c:25:0:
/home/josh/Downloads/arduino-0021/hardware/arduino/cores/arduino/wiring_private.h:28:20: fatal error: avr/io.h: No such file or directory
I installed version 21 this time as I couldn't find the 64 bit version 22 again.
After rereading this thread, I am wonder if you are still trying to use the software from tinhead, if so try using the blink example and see if it works.