I am using 64-bit Ubuntu and I want to install the Code::Blocks IDE. Is there any repository?

  • 3
    Cod::Blocks is in the Ubuntu repository.
    – zeitue
    Oct 10, 2012 at 6:28
  • 2
    @NlightNFotis How do you aspect someone who is new to Ubuntu to manage all those stuff. So, this is the place where lone user get help from the communities. May be the question may sound stupid for the expert but for the newbies it's a serious thing. Plz. don't understand estimate us instead lit the flame of 'Humanity'. Anyway, I consider you all as the expert, Plz don't hesitate to help me in the future.
    – Namshum
    Oct 10, 2012 at 6:54
  • 2
    @Namshum My comment was not to flame you, rather, to imply that any serious software developer is a problem solver, and he should find an answer to his problems by himself and not ask others for solutions to his problems, unless he has done all he could to find an answer, and yet he failed. Oct 10, 2012 at 12:33
  • 1
    @NlightNFotis Thanks! for your link. And also I want to tell you that I am trying to learn some programming in C++.
    – Namshum
    Oct 10, 2012 at 16:38
  • 2
    Possible duplicate of How do I install software using the Ubuntu Software Center? Oct 16, 2015 at 15:49

9 Answers 9


It's available in the Software Center.

Just open the Ubuntu Software Center and search for its name.

Or install via the terminal:

sudo apt-get install codeblocks
  • I got this error :- Failed to fetch in.archive.ubuntu.com/ubuntu/pool/universe/w/wxwidgets2.8/… Connection failed [IP: 80] E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
    – Namshum
    Oct 10, 2012 at 16:40
  • Doesn't show up in software center for me.
    – neuronet
    Feb 18, 2018 at 1:44
  • That terminal command works, even though it doesn't show up in the software center.
    – Domarius
    Feb 14, 2019 at 21:45

Note: damien-moore's PPA mentioned in this answer has Code::Blocks version 16.01 and does not support releases after 16.04.

From the Code::Blocks website, the download page for Linux points to the Code::Blocks Release Builds PPA, which is probably the easiest way to install a reasonably up-to-date version of Code::Blocks. To install Code::Blocks from the aforementioned PPA, do the following:

sudo add-apt-repository ppa:damien-moore/codeblocks-stable
sudo apt-get update
sudo apt-get install codeblocks codeblocks-contrib
  • 1
    This is much better method. Oct 21, 2018 at 10:07

Code::Blocks is a cross-platform Integrated Development Environment (IDE). It is based on a self-developed plugin framework allowing unlimited extensibility. Most of its functionality is already provided by plugins. Plugins included in the base package are:

  • Compiler frontend to many free compilers
  • Debugger frontend for GDB (and CDB for windows platforms)
  • Source formatter (based on AStyle)
  • Wizard to create new C++ classes
  • Code-completion / symbols-browser (work in progress)
  • Default MIME handler
  • Wizard to create new Code::Blocks plugins
  • To-do list
  • Extensible wizard based on scripts
  • Autosave (saves your work in the unfortunate case of a crash)1

To download and install click the image below.

Install via the software center

1Source:Ubuntu Apps Directory

  • 1
    The current version in the Ubuntu 12.04 repository is 10.05-2, while the website has Code::Blocks 12.11 available for download. Mar 19, 2013 at 2:44
  • @DrewNoakes you can manually download the deb packages and install those with DPKP ,
    – userDepth
    Jul 4, 2016 at 19:30

You can install CodeBlocks using following command:

sudo apt-get install codeblocks

If you plan to develop on ubuntu its beneficial to learn how to compile code from the command line ... even the codeblocks IDE

download source code


pick file similar to codeblocks_16.01.tar.gz

cd into where you wish to expand the tarball and issue

tar xvf /path/to/codeblocks_16.01.tar.gz

cd codeblocks-16.01.release

autoreconf -fi  #  
./configure  #  standard check to confirm your have necessary libs
make -j4   # actual compile and link step
sudo make install  # install binary and its libs
sudo ldconfig  # this registers your new libs

now its installed ... go ahead and launch

codeblocks   #  Voila you have launched your new IDE

If above gives errors you probably have yet to install upstream dependancies ... if so this may help

sudo apt-get install build-essential 
sudo apt-get install -y libwxbase3.0-0v5 libwxbase3.0-dev libwxgtk3.0-dev wx3.0-headers wx-common
sudo apt-get build-dep codeblocks 
  • While your way is correct it should state that compiling Code::Blocks against wxwidgets 3 is not yet properly supported and may result in crashes within the IDE, but the wxwidgets 2.8 is not available anymore with 16.04 LTS.
    – Videonauth
    Jul 4, 2016 at 18:15

All you need to do is to run:

sudo apt-get update


sudo apt-get upgrade

and then

sudo apt-get install codeblocks

Your repository list isn't up to date, you got update suggestion from Ubuntu. If you want to be Linux programmer I'm recommending you getting LPIC-1 knowledge before you start. It is crucial to understand basics of this system to code for it.


You can try installing the packages manually. Connecting via FTP to the archives with your file manager. Or download manually from the site in the link below.

Alternatively install it via GUI with GDEBI by clicking each deb file which will indicate if another package/dependency is missing then install that one first. You can start with Codeblocks and GDEBI will indicate the directly related packages and you follow that and avoid getting lost in dependencies.

Don't know if a file association can be made to click and trigger GDEBI directly from the browser.

FTP : Archives

The server is : ftp.archive.ubuntu.com

And the path to Codeblocks is : ubuntu/ubuntu/pool/universe/c/codeblocks

In a terminal type : ftp

Then comes the propmt

ftp> open ftp.archive.ubuntu.com
>Type password
"leave blank"
cd ubuntu/ubuntu/pool/universe/c/codeblocks
get *.deb

The files will be saved to HOME

delete the DEBs of the undesired architecture

Save this script :

# Reference
# http://www.cyberciti.biz/faq/bash-for-loop/
# https://www.dbsysnet.com/2015/12/using-bash-arrays-with-examples
BLOCKS=( hello young flying sun you don look old at all);
for LIST in 0 1 2 3 4 5 6 7 8 9 10 11 12
    echo ${BLOCKS[LIST]};

You can check for answers on how to use the script, Make it executable and run it from the HOME.

Replace echo with the bash command to install packages :

dpkg -i ${BLOCKS[LIST]};

Change the list message with the list of packages for Codeblocks in the HOME folder

ls *.deb

Match the number of packages to the list of 12 elements

If 20 elements then 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

  • Kinda complicated way of doing it, especially theres one problem with installing by dpkg you have to get the order right in which you install the packages and your script does not solve that.
    – Videonauth
    Jul 4, 2016 at 22:33
  • Right, And what about then using apt-get instead? Downloading the packages from archives and putting those on /var/... and telling apt-get to install that specific version ? That would be a bang if it worked. I think apt-get check the archives first to avoid re-downloading packages.
    – userDepth
    Jul 4, 2016 at 23:00
  • This could work, but don't nail me down on it, would have to setup a VM to test it tho. I compiled my Code::Blocks from scratch.
    – Videonauth
    Jul 4, 2016 at 23:05
  • Yes. as a true free user, a VM. That's why I want to use snapshots to revert those kind of things, there is apt-btrfs I kinda remember but it seemed to be unsupported I need it so I would fork it. Does Code Blocks has a MAKE RUN rule ? @Videonauth
    – userDepth
    Jul 5, 2016 at 15:12

I suggest to use newest version from 'Jens' Even if it's unofficial, we can get all versions. You can also choose repositury or just'deb' file.


For stable release, add these two lines to the sources.list file and refresh the package index

deb [arch=amd64,i386] https://apt.jenslody.de/stable jessie main
deb-src https://apt.jenslody.de/stable jessie main

Then install the codeblocks. Tested on Ubuntu 12.04 - both 32 and 64 bit.


I have quite a few methods do whatever you like

1. Download binaries

Current Version is 20.03 if you are reading this in future, go to this URL and check for the latest version http://www.codeblocks.org/downloads/binaries

Download the zip and install it on your system, there are .deb files.

2. Add PPA

You can add the official PPA from the launchpad, and can get updates as soon they release

Notice here - Ubuntu 20.04 is still not supported so don't get frustrated if its not installing in 20.04

sudo add-apt-repository ppa:codeblocks-devs/release\
&& sudo apt-get update \
&& sudo apt-get install codeblocks codeblocks-contrib

if you have 18.04 then do this ->

deb http://ppa.launchpad.net/codeblocks-devs/release/ubuntu bionic main\
&& deb-src http://ppa.launchpad.net/codeblocks-devs/release/ubuntu bionic main 

3. Use apt

sudo apt install code-blocks

I'm not 100% sure but i think these packages are maintained by canonical itself, so updates will be very slow, but there are only one or two updates in code block every year so you wont miss a lot of things even if you use this one.

Good luck doing C++, Its not python.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .