Cannot install build-essential package

Volumio Version: 2.882, 2.878

Cannot install build-essential package on fresh install of Volumio

volumio@volumio15:~$ sudo apt install build-essential                          
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 build-essential : Depends: gcc (>= 4:4.9.1) but it is not going to be installed
                   Depends: g++ (>= 4:4.9.1) but it is not going to be installed
                   Depends: dpkg-dev (>= 1.17.11) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Initial report to mpd_oled: Volumio 2.878, 2.882 - installation from source fail · Issue #66 · antiprism/mpd_oled · GitHub

This probably also affects other software instrallation from source such as the mpd_oled Volumio plugin and instructions for installing PeppyMeter.

Adrian.

Please run the following commands consecutively, should do the trick.

sudo apt-get autoremove (remove all dependent libraries)
sudo apt-get -f install (install all missing libraries)
sudo apt-get update (update repo’s)
sudo apt-get install build-essential (install package)

Hi Wheaten

This didn’t work, there was the same error.

olumio@volumio15:~$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 27 not upgraded.
volumio@volumio15:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 27 not upgraded.
volumio@volumio15:~$ sudo apt-get update
Hit http://archive.volumio.org jessie InRelease
Hit http://archive.volumio.org jessie InRelease
Hit http://archive.volumio.org jessie/main Sources
Hit http://archive.volumio.org jessie/contrib Sources
Hit http://archive.volumio.org jessie/non-free Sources
Hit http://archive.volumio.org jessie/rpi Sources
Hit http://archive.volumio.org jessie/main armhf Packages
Hit http://archive.volumio.org jessie/contrib armhf Packages
Hit http://archive.volumio.org jessie/non-free armhf Packages
Hit http://archive.volumio.org jessie/rpi armhf Packages
Hit http://archive.volumio.org jessie/main Sources
Hit http://archive.volumio.org jessie/ui Sources
Hit http://archive.volumio.org jessie/main armhf Packages
Hit http://archive.volumio.org jessie/ui armhf Packages
Ign http://archive.volumio.org jessie/contrib Translation-en
Ign http://archive.volumio.org jessie/main Translation-en
Ign http://archive.volumio.org jessie/non-free Translation-en
Ign http://archive.volumio.org jessie/rpi Translation-en
Ign http://archive.volumio.org jessie/main Translation-en
Ign http://archive.volumio.org jessie/ui Translation-en
Reading package lists... Done
volumio@volumio15:~$ sudo apt-get install build-essential 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 build-essential : Depends: gcc (>= 4:4.9.1) but it is not going to be installed
                   Depends: g++ (>= 4:4.9.1) but it is not going to be installed
                   Depends: dpkg-dev (>= 1.17.11) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Adrian.

1 Like

please run the follwing and provide the outcome:

sudo apt-get install gcc g++ dpkg-dev build-essential

Hi Wheaten

Same error.

sudo apt-get install gcc g++ dpkg-dev build-essential
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 dpkg-dev : Depends: binutils but it is not going to be installed
 g++ : Depends: g++-4.9 (>= 4.6.4-1~) but it is not going to be installed
       Depends: gcc-4.9 (>= 4.6.4-1~) but it is not going to be installed
 gcc : Depends: gcc-4.9 (>= 4.9.2-1~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

In case it is relevant, I am using a Pi Zero (I don’t know what Pi model the original issue report was for).

Adrian.

That was me. I’m using PI 2B v1.1 and this is not hardware issue.

please give back the output of the following commands:

gcc --version
g++ --version

Maybe Adrian can check it. Currently I’m away from my Pi.

Hi Wheaten

volumio@volumio15:~$ gcc --version
-bash: gcc: command not found
volumio@volumio15:~$ g++ --version
-bash: g++: command not found

Adrian.

Are you sure you are on stock Volumio image?
Can you check what all sources are currently enabled?

grep -r --include '*.list' '^deb ' /etc/apt/sources.list*

apt-cache policy build-essential

Hi ashthespy

As I recall I downloaded the latest Volumio and wrote it to a card (with balenaEtcher), booted up and went through the setup screens in the UI, enabled SSH, then logged in and ran the following commands (with the second command failing due to build-essential)

sudo apt update
sudo apt install build-essential git-core autoconf make libtool libfftw3-dev libmpdclient-dev libi2c-dev i2c-tools lm-sensors

Here is the output of the commands you posted

volumio@volumio15:~$ grep -r --include '*.list' '^deb ' /etc/apt/sources.list*
/etc/apt/sources.list:deb http://archive.volumio.org/raspbian/ jessie main contrib non-free rpi
/etc/apt/sources.list.d/raspi.list:deb http://archive.volumio.org/debian/ jessie main ui
volumio@volumio15:~$ apt-cache policy build-essential
build-essential:
  Installed: (none)
  Candidate: 11.7
  Version table:
     11.7 0
        500 http://archive.volumio.org/raspbian/ jessie/main armhf Packages

Adrian.

That looks sane. Then there is something going fishy going on with the new jessie images…

As a sanity check could you check what is the libc version installed?

sudo dpkg -l | grep libc

Hi ashthespy

volumio@volumio15:~$ sudo dpkg -l | grep libc
ii  klibc-utils                          2.0.4-2+rpi1                       armhf        small utilities built with klibc for early boot
ii  libc-bin                             2.24-11+deb9u4                     armhf        GNU C Library: Binaries
ii  libc-dev-bin                         2.24-11+deb9u4                     armhf        GNU C Library: Development binaries
ii  libc-l10n                            2.24-11+deb9u4                     all          GNU C Library: localization files
ii  libc6:armhf                          2.24-11+deb9u4                     armhf        GNU C Library: Shared libraries
ii  libc6-dev:armhf                      2.24-11+deb9u4                     armhf        GNU C Library: Development Libraries and Header Files
ii  libcaca0:armhf                       0.99.beta19-2                      armhf        colour ASCII art library
ii  libcairo2:armhf                      1.14.0-2.1+deb8u2                  armhf        Cairo 2D vector graphics library
ii  libcap-ng0:armhf                     0.7.4-2                            armhf        An alternate POSIX capabilities library
ii  libcap2:armhf                        1:2.24-8                           armhf        POSIX 1003.1e capabilities (library)
ii  libcap2-bin                          1:2.24-8                           armhf        POSIX 1003.1e capabilities (utilities)
ii  libcdaudio1                          0.99.12p2-13                       armhf        library for controlling a CD-ROM when playing audio CDs
ii  libcdio-cdda1                        0.83-4.2                           armhf        library to read and control digital audio CDs
ii  libcdio-paranoia1                    0.83-4.2                           armhf        library to read digital audio CDs with error correction
ii  libcdio13                            0.83-4.2                           armhf        library to read and control CD-ROM
ii  libcdparanoia0:armhf                 3.10.2+debian-11                   armhf        audio extraction tool for sampling CDs (library)
ii  libcgmanager0:armhf                  0.33-2+deb8u2                      armhf        Central cgroup manager daemon (client library)
ii  libchromaprint1:armhf                1.4.2-1                            armhf        audio fingerprint library
ii  libcomerr2:armhf                     1.42.12-2                          armhf        common error description library
ii  libconfig-dev:armhf                  1.4.9-2                            armhf        parsing/manipulation of structured config files (development)
ii  libconfig9:armhf                     1.4.9-2                            armhf        parsing/manipulation of structured configuration files
ii  libconfuse-common                    2.7-5+deb8u1                       all          Common files for libConfuse
ii  libconfuse0:armhf                    2.7-5+deb8u1                       armhf        Library for parsing configuration files
ii  libcpufreq0                          008-1                              armhf        shared library to deal with the cpufreq Linux kernel feature
ii  libcryptsetup4:armhf                 2:1.6.6-5                          armhf        disk encryption support - shared library
ii  libcups2:armhf                       1.7.5-11+deb8u4                    armhf        Common UNIX Printing System(tm) - Core library
ii  libcurl3:armhf                       7.38.0-4+deb8u13                   armhf        easy-to-use client-side URL transfer library (OpenSSL flavour)
ii  libcurl3-gnutls:armhf                7.38.0-4+deb8u13                   armhf        easy-to-use client-side URL transfer library (GnuTLS flavour)
ii  libklibc                             2.0.4-2+rpi1                       armhf        minimal libc subset for use with initramfs
ii  liblocale-gettext-perl               1.05-8+b1                          armhf        module using libc functions for internationalization in Perl
ii  linux-libc-dev:armhf                 4.9.82-1+deb9u3+rpi1               armhf        Linux support headers for userspace development

Adrian.

That isn’t a Jessie version, but Stretch… @volumio Heads up - this is going to lead to a lot of headaches…

1 Like

let’s wait on Volumio’s feedback.

1 Like

Hi,
I have found the reason for this problem. Some dependencies are missing for build-essentials. The binutils can’t installed, without remove the libc6-dev library. A newer dependencies are allready installed. The new binutil and other dependencies are needed, but they are only in the stretch source

My workaround is:

add temporary the debian stretch source to install the dependecies

sudo nano /etc/apt/sources.list

and add this line:

deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi

and update the package list:

sudo apt-get update
sudo apt-get install binutils
sudo apt-get install libstdc++-4.9-dev
sudo apt-get install gcc-4.9 gcc g++-4.9 g++ dpkg-dev

remove the line from source and update packagelist:

sudo apt-get update

Now you can install the build-essential successfully

here is a little script that do this all automatically

Workaround_BuildEssentials.zip (388 Bytes)

copy it to /home/volumio and make it executable with

chmod +x /home/volumio/Workaround_BuildEssentials.sh

I hope Volumio fix this with next version. :wink:
2aCD

3 Likes

Serious? Adding Stretch to a Jessie based OS?

I have the procedure now tested with a fresh install and a build from source.
All librarys are needed from stretch source to run a build successfully.

I have no other possibility found to resolve this issue.

@gkkpch Unfortunately the base rootfs already has installed a bunch of libraries from the stretch repo in these new(er) Jessie images for tidal connect.
@mervinio should know more.

Hello all.
Is the workaround described above the only way to somehow fix that, or will there be a fix for Volumio?
I am asking because I need gcc, to (for code I, unfortunately, scripted on RaspOS and now is not running on my test environment with the latest Volumio image)

Thanks

.:. Lutz