Cannot install build-essential package

Hi all,

Yesterday I got help from a neighbour to fix the same issue.
I have an Rpi with Twisted Pear Audio Hat and Cronus which I want to run.
My situation is slightly different since the below outputs are found:

gcc --version
g++ --version

We end up with the following:

root@volumio:/home/volumio/tpa-hermes-rpi-dev# git pull
Already up-to-date.
root@volumio:/home/volumio/tpa-hermes-rpi-dev# make clean
make -C /lib/modules/uname -r/build M=$PWD clean
make[1]: *** /lib/modules/4.19.118-v7+/build: No such file or directory. Stop.
Makefile:27: recipe for target ‘clean’ failed
make: *** [clean] Error 2
root@volumio:/home/volumio/tpa-hermes-rpi-dev#

Any suggestions? Thank you in advance.

Jordo

No one?.. :frowning:

Thank you for your Workaround! I’m very happy that you’ve found a solution for the issue!
The issue has broken my installation Routine for NR1-UI, am I allowed to use your “Fix-code” if I’ll credit you in my Github?
Thank you in advance!
Regards,
Christoph

@Maschine2501
no problem :wink:

2 Likes

@volumio the “build-essential” installation ist still broken on Volumio 2.909 (Rpi 4/4Gb - fresh installation). Will you fix this Issue? Cause my code need Build-Essential…

volumio@volumio:~$ 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.

Regards,

Christoph

1 Like

Is there a solution for this issue. Have the same problem with latest volumio 2.909. I need a g++ but unable to install

apt-get install build-essential
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

Tried to fix local package dependecies

apt-get autoremove #(remove all dependent libraries)
apt-get -f install
apt-get update

But no luck. Tried (as descripted in this post) to add

deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
to sources.list
Also with no luck, this breaks mpd and it won’t start anymore.

Any hints how to fix it and get the compiler running?
Is a possible solution to build volumio from scratch?

1 Like

Realistically I think you will need to wait for Volumio 3, which is currently undergoing beta testing.

Quite true. Having Stretch libraries in a Jessie distribution is going to cause all sorts of compilation problems, but I speculate this is necessary because of Tidal Connect (and Tidal is not going to compile TC for a distro that had reached EOL more than a year ago).

1 Like

Loaded up an 2.xx image after some time and ran into this personally.

It’s a tad annoying, as I don’t use Tidal, but even downgrading to a version that doesn’t use Tidal connect no longer works because of the certificate issues.

The issue with stretch libs is also seen from python and pip dependencies being broken.

What is the recommend way to solve this?

If a few libs are needed from Stretch, then there are much better ways than just get fetching everything from Stretch… But I agree, we can only speculate here and pin (hehe) things on the Tidal Connect plugin.

I did some looking up on the leaked/questionable versions of tidal connect floating around on github, and indeed you see that it needs some libs from Jessie and/or some from stretch(libflac++ libavformat57 libcurl3, etc). So the hypothesis indeed seems correct.

So here is what I did this morning to get my self back onto a pure Jessie base

Disclaimer: This is probably going to break other things down the line, so if you want to fiddle around, use the newer Buster images.

First, confirm there is a mysterious version of libc6 that apt doesn’t know the origins of…

volumio@volumio:~$ apt-cache policy libc6
libc6:
  Installed: 2.24-11+deb9u4
  Candidate: 2.24-11+deb9u4
  Version table:
 *** 2.24-11+deb9u4 0
        100 /var/lib/dpkg/status

Switch back to Jessie, remove the Stretch stuff:

You essentially have to do three things

  1. Tell apt that stuff was installed from stretch repos
    By adding stretch to /etc/apt/sources.list
cat <<-EOF > /etc/apt/sources.list
deb http://archive.volumio.org/raspbian/ jessie main contrib non-free rpi
#deb-src http://archive.volumio.org/raspbian/ jessie main contrib non-free rpi

# This is required to convince APT that there were stretch libs installed at some point
# Don't worry, we won't use it after fixing things..
deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
EOF
  1. Tell apt that we don’t want stuff from stretch, and revert to Jessie
    By setting proper pin priorities
cat <<-EOF >/etc/apt/preferences
Package: raspberrypi-bootloader
Pin: release *
Pin-Priority: -1

Package: raspberrypi-kernel
Pin: release *
Pin-Priority: -1

# Fix broken Jessie/Stretch hybrid images
Package: *
Pin: release n=jessie
Pin-Priority: 1001

Package: *
Pin: release n=stretch
Pin-Priority: -1
EOF
  1. Fix our broken libs
    By reinstalling libc6
sudo apt update && sudo apt install libc6 && sudo apt-get autoremove 

Automated script

All this is wrapped up in a script:

curl -fsSLO "https://git.io/backToJessie.sh" && chmod +x backToJessie.sh && sudo ./backToJessie.sh

As usual, don’t run stuff blindly (especially with sudo) so inspect what is going on over at Revert from hybrid Stretch/Jessie Volumio images back to pristine Jessie · GitHub

Once everything is is done, go ahead and install stuff as usual

sudo apt install build-essential

This probably will break tidal connect, I haven’t checked…