Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
3  
Cod::Blocks is in the Ubuntu repository. – zeitue Oct 10 '12 at 6:28
1  
@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 '12 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. – NlightNFotis Oct 10 '12 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 '12 at 16:38
2  
Possible duplicate of How do I install software using the Ubuntu Software Center? – DJCrashdummy Oct 16 '15 at 15:49
up vote 9 down vote accepted

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

share|improve this answer
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. – Drew Noakes Mar 19 '13 at 2:44
    
@DrewNoakes you can manually download the deb packages and install those with DPKP , – userDepth Jul 4 at 19:30

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
share|improve this answer
    
I got this error :- Failed to fetch in.archive.ubuntu.com/ubuntu/pool/universe/w/wxwidgets2.8/… Connection failed [IP: 91.189.92.182 80] E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? – Namshum Oct 10 '12 at 16:40

You can install CodeBlocks using following command:

sudo apt-get install codeblocks
share|improve this answer

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
share|improve this answer

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

http://www.codeblocks.org/downloads

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 
share|improve this answer
    
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 at 18:15

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.

http://apt.jenslody.de/

Tested on Ubuntu 12.04 - both 32 and 64 bit.

share|improve this answer

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
user
anonymous
>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 :

#!/bin/bash
# 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
do
    echo ${BLOCKS[LIST]};
done;

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

share|improve this answer
    
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 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 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 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 at 15:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.