1.找到对应的版本:http://www.codeblocks.org/downloads/binaries
2:利用PPA安装。
Current stable version of Code::Blocks IDE (16.01)
To install Code::Blocks from this PPA, open a terminal and type:
sudo add-apt-repository ppa:damien-
sudo apt-get update
sudo apt-get install codeblocks codeblocks-contrib
3:执行命令安装codeblocks
sudo apt-get install codeblocks
缺乏依赖关系就执行
apt-get -f install