1

I'm trying to install Code::Blocks without having success. It seems that the PPA I'm trying to use has problems, because after I run

sudo add-apt-repository ppa:damien-moore/codeblocks-stable

I get a lot of errors in the apt-get update output.

Zanna
  • 70,465
  • 1
    Edit your question to show me the errors. Copy/paste please. Not in the comments, please. And I'll take a look. – heynnema Aug 10 '17 at 13:52
  • 2
    the repository simply has no packages for 17.04 - (the standard error is The repository 'http://ppa.launchpad.net/damien-moore/codeblocks-stable/ubuntu zesty Release' does not have a Release file. and you will get a 404 too) cc @heynnema – Zanna Aug 10 '17 at 13:57
  • 2
    Why not install safely from main repository sudo apt install codeblocks? Do you need a specific/newer version? – Zanna Aug 10 '17 at 13:58

1 Answers1

1

Currently the PPA doesn't have a package for 17.04, but the official Ubuntu repositories for 17.04 currently have the latest version, so you can just use that.

The PPA you are using is the generally recommended PPA for getting the current stable version of Code::Blocks. However, currently that PPA does not support Ubuntu 17.04.

If you go to the PPA page and scroll down to Overview of published packages, there is a Published in: drop-down menu, which shows that the PPA currently provides packages for Precise (i.e., 12.04 LTS Precise Pangolin), Trusty (i.e., 14.04 LTS Trusty Tahr), Vivid (i.e., 15.04 Vivid Vervet), Wily (i.e., 15.10 Wily Werewolf), and Xenial (i.e., 16.04 LTS Xenial Xerus).

"Published in" drop-down menu on the PPA page showing what releases the PPA provides packages for

Currently your release--17.04 Zesty Zapus--is not listed there. In the future, if Zesty appears, that means the PPA provides packages for 17.04. (It will not guaranteee that it provides all the necessary packages, though likely it will.)

Right now the PPA provides Code::Blocks 16.01, which the Code::Blocks website confirms is currently the latest stable release. The name of the package the PPA provides is codeblocks. Searching for this package on the Ubuntu project page on Launchpad yields a search result for the versions packaged officially for Ubuntu. Clicking through brings up the source package page for codeblocks in Ubuntu, which shows the currently available versions.

Screenshot of the codeblocks in Ubuntu source package page on Launchpad showing the versions available in recent Ubuntu releases.

This reveals that 17.04 Zesty Zapus already has Code::Blocks 16.01. Eventually this will no longer be the latest stable release of Code::Blocks, and when that happens hopefully the PPA will support Zesty. However, until then, you should expect that installing from the official Ubuntu repositories for 17.04 is just as good as installing from the PPA on an earlier release.

To fix your problem, remove the PPA. Then just install the codeblocks package.

Upgrading the Package Later

If the PPA later supports your Ubuntu release and provides a later version of Code::Blocks, and you decide you want to upgrade to that version, then it will be sufficient to enable the PPA again and upgrade the packages on your system (such as with the Software Updater or by running sudo apt update && sudo apt upgrade).

This works because both Ubuntu's official repositories and the PPA provide Code::Blocks as the codeblocks package. If the PPA is enabled, has a package for your system, and the package has a newer version than your currently have installed, then you upgrade to it automatically.

Eliah Kagan
  • 117,780
  • Thank you so much. I'd already removed the PPA, now I'm gonna just download the version from Ubuntu PPA, which is even easier :). Just one more thing, when they release a new version, there is an easy way to update the program? I'm afraid of interference, if I just download the new version with the old still in my computer could something like this happen? – Kevin de Lima Alves Aug 10 '17 at 22:43
  • @KevinL.A. The official Ubuntu package and PPA-provided package are both codeblocks so if the PPA supports 17.04 and you re-enable it, the codeblocks package will upgrade automatically with the rest of your system. It will be treated like other updates you receive. They won't interfere with one another--upgrading packages, even across separate repositories, is designed to work I've expanded my answer a bit to cover this. (You should be aware that the PPA version will not have been vetted by Ubuntu maintainers and may have more bugs--though I have not experienced this with Code::Blocks.) – Eliah Kagan Aug 10 '17 at 22:59
  • I've already experienced crashs and bugs in this PPA version. – Kevin de Lima Alves Aug 12 '17 at 00:54
  • @KevindeLimaAlves I'm sorry to hear that! Is this with the version installed from the official Ubuntu repositories? (Ubuntu's default software sources aren't PPAs.) Or with the PPA-provided Code::Blocks on a different Ubuntu release? If the version of Code::Blocks you're using now from the official Ubuntu repositories is crashing or otherwise buggy, can you describe the problem? You'll likely want to file a bug and/or switch Code::Blocks versions--but if you say what's wrong, maybe I'll have an idea. – Eliah Kagan Aug 12 '17 at 01:03