0

I installed Code:Blocks on my Ubuntu 18.04 LTS. It works fine for now and I don't have any problem with it. But when I update my system using

sudo apt-get update && sudo apt-get upgrade -y

I get an error saying

Err:7 http://ppa.launchpad.net/damien-moore/codeblocks-stable/ubuntu bionic Release
  404  Not Found [IP: 91.189.95.83 80]
Reading package lists... Done                      
E: The repository 'http://ppa.launchpad.net/damien-moore/codeblocks-stable/ubuntu bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Now, when I delete http://ppa.launchpad.net/damien-moore/codeblocks-stable/ubuntu bionic in the Software Center, Code:Blocks doesn't run the programs I've written. Having this error doesn't seem to harm anything but it is annoying.

How to solve this? I'm taking C courses in school, so I need some compiler in order to do my homeworks, but I am open to use something different. Thanks

Zanna
  • 70,465
sarp
  • 433

2 Answers2

1

As was mentioned - the ppa:damien-moore/codeblocks-stable do not have packages for 18.04.

But search on Launchpad for Code::Blocks related PPAs results in other PPA named ppa:pasgui/ppa.

You can add it with

sudo add-apt-repository ppa:pasgui/ppa
sudo apt-get install codeblocks

and you will get CodeBlocks 17.12.

Optionally you can install contrib plugins with

sudo apt-get install codeblocks-contrib

and enjoy the plugins.

N0rbert
  • 99,918
0

That PPA appears to be for older versions of Ubuntu that don't include a modern version of the codeblocks package:

Notice it's for 16.04 versions of Ubuntu, which is why your modern (18.04 bionic) version cannot find files on that PPA. It doesn't make a difference though because Ubuntu Bionic contains Version: 16.01+dfsg-2.1 of codeblocks anyhow.

If you want to compile C code on Ubuntu the easiest way to make sure you have the compiler and it's associated files is to install the build-essential package:

sudo apt install build-essential

You should now have the gcc and g++ commands for building C/C++ and other languages supported by it. Save this as hello.c

#include <stdio.h>
int main() { printf("hello\n"); }

Then compile it:

gcc hello.c

Then run it:

./a.out