4

I can't install code block: sources.list got like this:

deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free r$
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
deb-src http://archive.raspbian.org/raspbian/ wheezy main contrib non-free rpi

Installing:

sudo apt-get install codeblocks
 Reading package lists... Done
Building dependency tree
Reading state information... Done
Package codeblocks is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  codeblocks-common

E: Package 'codeblocks' has no installation candidate

codeblocks-common doesn't works too

2
  • Try: sudo apt-get install codeblocks-common
    – Wilf
    Aug 8 '15 at 12:00
  • Already typed that have tried
    – windman
    Aug 8 '15 at 12:03
1

Run sudo apt-get update first to update the repositories and lists of packages and it's versions. I just tried to install it and had no issues.

0

Debian's package manager can be a surly PITA. There may well be a way to untangle this properly, but in lieu of that here's something you can try.

There is certainly a ton of stuff in the codeblocks directory of the Raspbian repo, including what looks like v. 10.05 and 13.12 (note I'm not actually a codeblocks user). These are respectively the wheezy and jessie defaults. So unless you want to upgrade to jessie, you should try 10.05. You want the .deb file:

wget http://mirrordirector.raspbian.org/raspbian/pool/main/c/codeblocks/codeblocks_10.05-2.1_armhf.deb

This can then be installed directly with dpkg:

dpkg -i codeblocks_10.05-2.1_armhf.deb

I'm not promising that won't spit the same error, but I think it might not. It might instead fail because of a missing dependency, which you should try and install manually with apt-get and only if that fails start poking around in the repo as above. Keep track of anything you do install with dpkg, because if it doesn't work in the end you should probably remove all that stuff:

dpkg -r codeblocks_10.05-2.1_armhf

Note that's the name of the package sans the .deb file suffix this time. Dpkg has a manual page, see man dpkg.

3
  • I notice the last part of the first line of your sources.list is r$. I don't know whether that was a cut and paste accident or if it really is that way, but it should be rpi.
    – goldilocks
    Aug 9 '15 at 14:33
  • 1
    It's just the way nano shows when text is longer than console.
    – windman
    Aug 10 '15 at 23:01
  • I've added deb ftp.pl.debian.org/debian wheezy main contrib non-free and it worked, but I'm not sure either this do the job or sth else.
    – windman
    Aug 10 '15 at 23:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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