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
That’s it! :smiley:

:!: Update Aug 29 2008: Changes to the 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.


You’ll need to edit the 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'  
>     sudo sh  

*In Ubuntu 8.04 we need to make a small change to the script. As of now there is no repository available at 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’” 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:

any help welcome,



Ok, so from your terminal output it looks like the codeblocks version in the 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 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 script, paste the original code back in and run the script again as sudo.

original below:

DISTRIB_CODENAME=`cat /etc/lsb-release | grep DISTRIB_CODENAME | sed 's/DISTRIB_CODENAME\=\(\.*\)/\1/g'`  
WX_DEB="deb []( $DISTRIB_CODENAME-wx main"  
CB_DEB="deb []( $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 []( -O- | apt-key add -  
wget -q []( -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