6

I want to build kernel modules in Alpine; I know how to do it in Ubuntu.
In Ubuntu, I used to install kernel headers by running:

apt install -y build-essential linux-headers-$(uname -r)

What is the equivalent in Alpine?

I searched on the web and Github user progrium wrote a comment that the equivalent for build-essential is build-base, but what about the linux-headers-$(uname -r) ?

Jeff Schaller
  • 66,199
  • 35
  • 114
  • 250
E235
  • 363
  • 7
  • 19

1 Answers1

12

build-base is indeed the equivalent to build-essential.

The package providing the headers and scripts needed to build kernel modules is the -dev package matching your kernel package, e.g. linux-lts-dev.

Stephen Kitt
  • 411,918
  • 54
  • 1,065
  • 1,164