欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Ubuntu 16.04 安装 Code Blocks 16.01

程序员文章站 2022-07-14 22:42:26
...

Ubuntu 16.04 安装 Code Blocks 16.01

1. Ubuntu 16.04 - Codeblocks 13.12

通过 Ubuntu Software Center 安装的 Codeblocks 13.12 会经常出现卡死 / 崩溃现象。

2. Ubuntu 16.04 安装 Code Blocks 16.01

aaa@qq.com:~$ sudo apt-get autoremove codeblocks
[sudo] password for strong:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'codeblocks' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 132 not upgraded.
aaa@qq.com:~$
  1. Before installing the code blocks, we will need to install the required PPA repositories.
    在安装 code blocks 之前,我们将需要安装所需的 PPA repositories。
sudo add-apt-repository ppa:damien-moore/codeblocks-stable  # Install PPA Repository
aaa@qq.com:~$ sudo add-apt-repository ppa:damien-moore/codeblocks-stable
 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-moore/codeblocks-stable
sudo apt-get update
sudo apt-get install codeblocks codeblocks-contrib
 More info: https://launchpad.net/~damien-moore/+archive/ubuntu/codeblocks-stable
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmp91zbyu8v/secring.gpg' created
gpg: keyring `/tmp/tmp91zbyu8v/pubring.gpg' created
gpg: requesting key C99E40E1 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmp91zbyu8v/trustdb.gpg: trustdb created
gpg: key C99E40E1: public key "Launchpad PPA for spillz" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK
aaa@qq.com:~$
  1. After installing the PPA repository for code blocks just update the packages & repositories using below command.
    在为 code blocks 安装 PPA repository 后,只需使用以下命令更新软件包和存储库。
sudo apt-get update   # Update Packages & Repositories
aaa@qq.com:~$ sudo apt-get update
Get:1 file:/var/cuda-repo-8-0-local-ga2  InRelease
Ign:1 file:/var/cuda-repo-8-0-local-ga2  InRelease
Get:2 file:/var/cuda-repo-8-0-local-ga2  Release [574 B]
Get:2 file:/var/cuda-repo-8-0-local-ga2  Release [574 B]
Get:4 http://linux.teamviewer.com/deb stable InRelease [9,388 B]
Get:5 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
Ign:6 http://www.scootersoftware.com bcompare4 InRelease
Hit:7 http://cn.archive.ubuntu.com/ubuntu xenial InRelease
Get:8 http://cn.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Get:9 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [831 kB]
Hit:10 http://www.scootersoftware.com bcompare4 Release
......
  1. During the installation process it will ask for confirmation, Just enter y to continue the installation process.
    在安装过程中,它将要求您进行确认。只需输入 y 即可继续安装过程。
sudo apt-get install codeblocks  # Install code blocks 16.01 Package
aaa@qq.comrong:~$ sudo apt-get install codeblocks
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  codeblocks-common libcodeblocks0 libwxbase2.8-0 libwxgtk2.8-0
Suggested packages:
  libwxgtk2.8-dev | libwxgtk3.0-dev wx-common codeblocks-contrib
The following NEW packages will be installed:
  codeblocks codeblocks-common libcodeblocks0 libwxbase2.8-0 libwxgtk2.8-0
0 upgraded, 5 newly installed, 0 to remove and 133 not upgraded.
Need to get 10.7 MB of archives.
After this operation, 32.7 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ppa.launchpad.net/damien-moore/codeblocks-stable/ubuntu xenial/main amd64 libwxbase2.8-0 amd64 2.8.12.1+dfsg2-ppa1~ubuntu16.04.1 [551 kB]
Get:2 http://ppa.launchpad.net/damien-moore/codeblocks-stable/ubuntu xenial/main amd64 libwxgtk2.8-0 amd64 2.8.12.1+dfsg2-ppa1~ubuntu16.04.1 [2,611 kB]
Get:3 http://ppa.launchpad.net/damien-moore/codeblocks-stable/ubuntu xenial/main amd64 libcodeblocks0 amd64 16.01~ubuntu16.04.1 [2,352 kB]
Get:4 http://ppa.launchpad.net/damien-moore/codeblocks-stable/ubuntu xenial/main amd64 codeblocks-common all 16.01~ubuntu16.04.1 [3,321 kB]
Get:5 http://ppa.launchpad.net/damien-moore/codeblocks-stable/ubuntu xenial/main amd64 codeblocks amd64 16.01~ubuntu16.04.1 [1,868 kB]
Fetched 10.7 MB in 34s (307 kB/s)
Selecting previously unselected package libwxbase2.8-0:amd64.
(Reading database ... 340266 files and directories currently installed.)
Preparing to unpack .../libwxbase2.8-0_2.8.12.1+dfsg2-ppa1~ubuntu16.04.1_amd64.deb ...
Unpacking libwxbase2.8-0:amd64 (2.8.12.1+dfsg2-ppa1~ubuntu16.04.1) ...
Selecting previously unselected package libwxgtk2.8-0:amd64.
Preparing to unpack .../libwxgtk2.8-0_2.8.12.1+dfsg2-ppa1~ubuntu16.04.1_amd64.deb ...
Unpacking libwxgtk2.8-0:amd64 (2.8.12.1+dfsg2-ppa1~ubuntu16.04.1) ...
Selecting previously unselected package libcodeblocks0.
Preparing to unpack .../libcodeblocks0_16.01~ubuntu16.04.1_amd64.deb ...
Unpacking libcodeblocks0 (16.01~ubuntu16.04.1) ...
Selecting previously unselected package codeblocks-common.
Preparing to unpack .../codeblocks-common_16.01~ubuntu16.04.1_all.deb ...
Unpacking codeblocks-common (16.01~ubuntu16.04.1) ...
Selecting previously unselected package codeblocks.
Preparing to unpack .../codeblocks_16.01~ubuntu16.04.1_amd64.deb ...
Unpacking codeblocks (16.01~ubuntu16.04.1) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20180209-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for desktop-file-utils (0.22-1ubuntu5.2) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for shared-mime-info (1.5-2ubuntu0.2) ...
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1.1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up libwxbase2.8-0:amd64 (2.8.12.1+dfsg2-ppa1~ubuntu16.04.1) ...
Setting up libwxgtk2.8-0:amd64 (2.8.12.1+dfsg2-ppa1~ubuntu16.04.1) ...
Setting up libcodeblocks0 (16.01~ubuntu16.04.1) ...
Setting up codeblocks-common (16.01~ubuntu16.04.1) ...
Setting up codeblocks (16.01~ubuntu16.04.1) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
aaa@qq.com:~$
  1. We have installed Code Blocks 16.01 package successfully.
    我们已经成功安装了 Code Blocks 16.01 软件包。
sudo dpkg -l codeblocks   # Confirm the Installed Package
aaa@qq.com:~$ sudo dpkg -l codeblocks
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                           Version              Architecture         Description
+++-==============================-====================-====================-=================================================================
ii  codeblocks                     16.01~ubuntu16.04.1  amd64                Code::Blocks integrated development environment (IDE)
aaa@qq.com:~$
  1. To open the Code Blocks application just enter the command codeblocks on shell.
    要打开 Code Blocks 应用程序,只需在 shell 上输入命令 codeblocks
codeblocks   # Open the application
aaa@qq.com:~$ codeblocks
......

Ubuntu 16.04 安装 Code Blocks 16.01

Ubuntu 16.04 安装 Code Blocks 16.01

You can also open the Code Blocks application graphically using Search your Ubuntu Applications box. Refer to the snapshot below.
您还可以使用 Search your Ubuntu Applications 框以图形方式打开 Code Blocks 应用程序。请参考下面的快照。

Ubuntu 16.04 安装 Code Blocks 16.01