installing codeblocks 8.02 in ubuntu 8.04 hardy heron

Starting from a fresh install of ubuntu 8.04, download the of_preRelease_v0.05_linux_cb_FAT archive and unpack it. From the terminal navigate to the folder where you’ve unpacked the archive and then to the scripts folder. Then type: sudo sh install_codeblocks.sh
That’s it! :smiley:

:!: Update Aug 29 2008: Changes to the install_codeblocks.sh are no longer necessary. If you’ve already made the changes then you should restore the original script and run it as sudo to update to the newest version of codeblocks.

THE FOLLOWING CHANGES ARE NO LONGER NECESSARY!!!

You’ll need to edit the install_codeblocks.sh script (*explained below) and then run the script as sudo.

  
>       
>     cd of_preRelease_v0.05_linux_cb_FAT/scripts/  
>     sed -i -e '/wxwidgets/d' -e '/wx.list/d' install_codeblocks.sh  
>     sudo sh install_codeblocks.sh  
>       
>     

*In Ubuntu 8.04 we need to make a small change to the install_codeblocks.sh script. As of now there is no repository available at http://apt.wxwidgets.org/ for the hardy distribution of the wxwidgets libraries. Also the newest version of the wxwidgets libraries are available through the official Ubuntu universe repositories so in the script we can just erase the lines that attempt to add the 3rd party repository. The command “sed -i -e ‘/wxwidgets/d’ -e ‘/wx.list/d’ install_codeblocks.sh” seems to take care of that.

i’m having trouble installing cb in ubuntu 8.04 . first i tried downloading the files from the codeblocks site, unpacking and installing through synaptic. it installed and cb executed but i couldn’t run or complile anything. when i googled for the error i was getting i came across a thread in the of forum from someone having similar problems, the replies indicated that it might be related to bad installation procedure. i then found this thread, removed the cb packages i had installed in synaptic and attemped to follow the instructions on this thread. codeblocks didn’t install, or if it did i can’t find it anywhere. here is the transcript from the terminal:

http://www.squerk.org/temp/cb-install-terminal.txt

any help welcome,

thanks

(edited)

Ok, so from your terminal output it looks like the codeblocks version in the http://lgp203.free.fr/ubuntu/ has updated and now depends on a version of libwxgtk that is not in the standard Ubuntu respositories. Also I just checked and it appears that now there IS a new version of libwxgtk for hardy in the http://apt.wxwidgets.org/ respositories. This means that Arturo’s orginal script should now function correctly without the changes I previously recommended… so I guess I should have showed people how to comment out those lines instead of deleting them. :oops: Lesson learned.
If you’ve already made the changes then open the install_codeblocks.sh script, paste the original code back in and run the script again as sudo.

original install_codeblocks.sh below:

  
  
#!/bin/bash  
DISTRIB_CODENAME=`cat /etc/lsb-release | grep DISTRIB_CODENAME | sed 's/DISTRIB_CODENAME\=\(\.*\)/\1/g'`  
WX_DEB="deb [http://apt.wxwidgets.org/](http://apt.wxwidgets.org/) $DISTRIB_CODENAME-wx main"  
CB_DEB="deb [http://lgp203.free.fr/ubuntu/](http://lgp203.free.fr/ubuntu/) $DISTRIB_CODENAME universe"  
  
echo $WX_DEB > /etc/apt/sources.list.d/wx.list  
echo $CB_DEB > /etc/apt/sources.list.d/cb-nightly.list  
  
wget -q [http://apt.wxwidgets.org/key.asc](http://apt.wxwidgets.org/key.asc) -O- | apt-key add -  
wget -q [http://lgp203.free.fr/public.key](http://lgp203.free.fr/public.key) -O- | apt-key add -  
  
apt-get update  
  
apt-get install libcodeblocks0 codeblocks libwxsmithlib0 codeblocks-contrib  
  
apt-get install freeglut3-dev libasound2-dev libxmu-dev libxxf86vm-dev g++ libgl1-mesa-dev libglu1-mesa-dev libraw1394-dev