Code::Blocks on Ubuntu
At the time of writing, Ubuntu only has Code::Blocks 8.02 in the repositories, and the nightly binary builds are only supplied for Windows form the Code::Blocks developers. Thankfully, a forum user named Jen supplies packages compatible with Ubuntu so let’s get at it…
First we need to add the sources for the latest wxWidgets builds, you can either do this through the System -> Administration -> Software Sources menu, or directly editing your /etc/apt/sources.list with your favorite text editor. Remember to edit it as root or via sudo. When ready, add these lines (substitute your distribution for dist, i.e. jaunty-wx – NOTE : there are as yet no builds for karmic, but the jaunty ones work just fine):
deb http://apt.jenslody.de/ any main
deb-src http://apt.jenslody.de/ any main
Then you need to add the signature keys for the packages, enter these commands at a prompt:
sudo apt-get install jens-lody-debian-keyring
wget -q http://apt.wxwidgets.org/key.asc -O- | sudo apt-key add -
You may well receive an error when installing the jens-lody-debian-keyring, it’s fine to push through it.
Now we’re ready to pull down the compiler itself and Code::Blocks IDE, simply enter the following the command into a prompt:
You should now have the latest nightly SVN of Code::Blocks, enjoy coding!!
Super! Thanks for that.
One question – should the wxWidgets updates be showing up as unauthenticated when I use Update Manager/apt-get update? Or does that only happen the first time?
Yes, both wxWidgets and the SVN build of Code::Blocks with show as unauthenticated the first time you run apt-get update. This is because for some reason, jens decided to package his security key and load in into his repository, rather than host it as a plain PGP key for importing like most other 3rd party repositories do.
The keys are imported before the actual packages themselves are downloaded, so by the time you apt-get install build-essential codeblocks all repositories should be authenticated and you should not receive warnings.