Go Down

Topic: Fresh Start (Read 6893 times) previous topic - next topic

Ardui_Noob

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).

mrtaylor

Try this command.  This will reinstall arduino
sudo apt-get install --reinstall arduino

Ardui_Noob

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

mrtaylor

#3
Jan 21, 2011, 12:35 am Last Edit: Jan 21, 2011, 12:36 am by mrtaylor Reason: 1
The last time I did it I used the following instructions:

Download version 0022 from:
  http://arduino.cc/en/Main/Software
  // 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 .

// go up one directory
cd ..                            

// exec arduino software
./arduino      
 

Ardui_Noob

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.  

mrtaylor

#5
Jan 21, 2011, 12:55 am Last Edit: Jan 21, 2011, 01:19 am by mrtaylor Reason: 1
reinstall gcc-avr, avr-libc

edited again
sudo apt-get install --reinstall gcc-avr
sudo apt-get install --reinstall avr-libc

reinstall java
sudo apt-get install --reinstall openjdk-6-jre

my system also has binutils-avr installed
sudo apt-get install --reinstall binutils-avr

and avrdude
sudo apt-get iinstall --reinstall avrdude

Ardui_Noob

No joy.

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:~$







mrtaylor

Sorry I was try to follow the instruction for ubuntu on the arduino web page. I have edited the post to show what on my system.

mrtaylor

Quote
0: fatal error: stdlib.h: No such file or directory

stdlib.h is located in directory /usr/lib/avr/include
and is part of package avr-libc
The command to show this is:
dpkg -S stdlib.h


scottk

Thank you mrtaylor for your help, your instructions have succesfully helped me to install arduino 22 on my system, finally.

Ardui_Noob

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.

mrtaylor

io.h should be located in directory /usr/lib/avr/include/avr/.  Check and see if the file is there.

mrtaylor

Just a thought try running arduino as the root

sudo ./arduino

mrtaylor

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.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy