0

I am trying to install and setup the Linux Kernel on my Raspberry Pi Linux Kernel. I've referenced the following website: https://www.raspberrypi.com/documentation/computers/linux_kernel.html.

So far, I've run the following commands on my raspberry pi in the following sequence:

  1. sudo apt update
  2. sudo apt upgrade
  3. sudo apt-get autoremove
  4. sudo apt install git bc bison flex libssl-dev make
  5. git clone --depth=1 https://github.com/raspberrypi/linux
  6. cd linux KERNEL=kernel7 make bcm2709_defconfig
  7. make -j4 zImage modules dtbs
  8. sudo make modules_install
  9. sudo cp arch/arm/boot/dts/*.dtb /boot/
  10. sudo cp arch/arm/boot/dts/overlays/.dtb /boot/overlays/
  11. sudo cp arch/arm/boot/dts/overlays/README /boot/overlays/
  12. sudo cp arch/arm/boot/zImage /boot/$KERNEL.img
  13. sudo apt install git bc bison flex libssl-dev make libc6-dev libncurses5-dev
  14. sudo apt install crossbuild-essential-armhf

However,I encountered the following error when executing the command at point 14.

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:
 crossbuild-essential-armhf : Depends: gcc-arm-linux-gnueabihf (>= 5.3) but it is not going to be installed
                              Depends: g++-arm-linux-gnueabihf (>= 5.3) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

2 Answers 2

0

Try installing the dependency that says it will not be installed. For example:

sudo apt install gcc-arm-linux-gnueabihf

Eventually apt will say something like "Depends: [package] is not installable"

2
  • Yes, I got this message: "Depends: [package] is not installable". What should I do? May 1 at 14:24
  • Try installing it. It should list what package dependencies are conflicting. I'm surprised you got into this state from a clean install. Usually this happens because some package was installed that causes dependency issues.
    – user570799
    May 1 at 14:51
0

What raspberry OS version are you using? Maybe you could avoid the problems by using a newer raspberry OS version.

In any case, I would first try to:

sudo apt-get update
sudo apt-get install gcc-arm-linux-gnueabihf
sudo apt-get install g++-arm-linux-gnueabihf
sudo apt --fix-broken install
2
  • Hi, thanks for the comment. However, I am unable to run the install commands. I got the same error: unmet dependencies. This is my OS version: VERSION_ID="9" VERSION="9 (stretch)" VERSION_CODENAME=stretch May 1 at 14:24
  • apt --fix-broken install also fails? I'm not sure how to debug this further, I'd suggest trying a clean operating system and trying to install the dependencies again. I'm using VERSION="10 (buster)" and I was able to install crossbuild-essential-armhf without any problems.
    – GChuf
    May 1 at 14:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .