0
Sigge

v4l2loopback: The kernel headers for this kernel does not seem to be installed.

Recommended Posts

Hi, trying to install or compile v4l2loopback.

 

I fail with missing header message. I have tried armbian-config and apt-get for the headers but all fails.

I have tried stable and dev.

 

Anyone know how to do this?

 

orangepiplus2e:/lib/modules/4.17.5-sunxi$ sudo apt-get install v4l2loopback-dkms
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  dkms
Suggested packages:
  python3-apport menu v4l2loopback-utils
Recommended packages:
  fakeroot linux-headers-686-pae | linux-headers-amd64 | linux-headers-generic | linux-headers
The following NEW packages will be installed:
  dkms v4l2loopback-dkms
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/107 kB of archives.
After this operation, 397 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Selecting previously unselected package dkms.
(Reading database ... 51147 files and directories currently installed.)
Preparing to unpack .../archives/dkms_2.3-2_all.deb ...
Unpacking dkms (2.3-2) ...
Selecting previously unselected package v4l2loopback-dkms.
Preparing to unpack .../v4l2loopback-dkms_0.10.0-1_all.deb ...
Unpacking v4l2loopback-dkms (0.10.0-1) ...
Setting up dkms (2.3-2) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up v4l2loopback-dkms (0.10.0-1) ...
Loading new v4l2loopback-0.10.0 DKMS files...
Building for 4.17.5-sunxi
Module build for kernel 4.17.5-sunxi was skipped since the
kernel headers for this kernel does not seem to be installed.

 

Buildning gives me this:

orangepiplus2e:~/v4l2loopback$ make
Building v4l2-loopback driver...
make -C /lib/modules/`uname -r`/build M=/home/aaa/v4l2loopback modules
make[1]: *** /lib/modules/4.17.5-sunxi/build: No such file or directory.  Stop.
Makefile:42: recipe for target 'v4l2loopback.ko' failed
make: *** [v4l2loopback.ko] Error 2

Share this post


Link to post
Share on other sites

This is what I get when trying to install with apt-get:

 

orangepiplus2e:~/v4l2loopback$ sudo apt-get install linux-headers-sun8i
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  linux-headers-sun8i
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 5 811 kB of archives.
After this operation, 39,7 MB of additional disk space will be used.
Get:1 http://beta.armbian.com stretch/main armhf linux-headers-sun8i armhf 5.52.180710 [5 811 kB]
Fetched 5 811 kB in 1s (4 502 kB/s)              
Selecting previously unselected package linux-headers-sun8i.
(Reading database ... 51187 files and directories currently installed.)
Preparing to unpack .../linux-headers-sun8i_5.52.180710_armhf.deb ...
Unpacking linux-headers-sun8i (5.52.180710) ...
Setting up linux-headers-sun8i (5.52.180710) ...
Compiling headers - please wait ...

orangepiplus2e:~/v4l2loopback$ sudo apt-get install v4l2loopback-dkms
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  v4l2loopback-utils
The following NEW packages will be installed:
  v4l2loopback-dkms
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/32,6 kB of archives.
After this operation, 109 kB of additional disk space will be used.
Selecting previously unselected package v4l2loopback-dkms.
(Reading database ... 63931 files and directories currently installed.)
Preparing to unpack .../v4l2loopback-dkms_0.10.0-1_all.deb ...
Unpacking v4l2loopback-dkms (0.10.0-1) ...
Setting up v4l2loopback-dkms (0.10.0-1) ...
Loading new v4l2loopback-0.10.0 DKMS files...
dpkg: warning: version '3.4.113-sun8i
4.17.5' has bad syntax: invalid character in revision number
Building for 4.17.5-sunxi
Module build for kernel 4.17.5-sunxi was skipped since the
kernel headers for this kernel does not seem to be installed.

Share this post


Link to post
Share on other sites
18 hours ago, Sigge said:

I fail with missing header message. I have tried armbian-config and apt-get for the headers but all fails.

I have tried stable and dev.


Switch to automated nightly builds and try default and next kernel, skip DEV. They all have matching headers and repeat the process.

Share this post


Link to post
Share on other sites

Should I do that through armbian-config? Install headers just blink and change kernel only gives me one option that says failed, aborting. Maybe I should reinstall, might have messed up with my attempts.

Share this post


Link to post
Share on other sites

Ok, so I have re flashed my card. Went with:

Armbian Stretch
mainline kernel 4.14.y

 

Enabled nightly builds and installed headers. So far so good. Updated.

 

orangepiplus2e:~/v4l2loopback$ make VERBOSE=1
Building v4l2-loopback driver...
make -C /lib/modules/`uname -r`/build M=/home/aaa/v4l2loopback modules
make[1]: Entering directory '/usr/src/linux-headers-4.17.5-sunxi'
  Building modules, stage 2.
  MODPOST 1 modules
/bin/sh: 1: scripts/mod/modpost: not found
scripts/Makefile.modpost:92: recipe for target '__modpost' failed
make[2]: *** [__modpost] Error 127
Makefile:1574: recipe for target 'modules' failed
make[1]: *** [modules] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.17.5-sunxi'
Makefile:42: recipe for target 'v4l2loopback.ko' failed
make: *** [v4l2loopback.ko] Error 2

 

So I wanted to try and switch default and next kernel as suggested.

 

However; the only option is to switch from next to dev?  This is in "Switch", should I use "Default, install desktop ..." instead?

Share this post


Link to post
Share on other sites

after:

sudo apt-get install bison libbison-dev flex libfl-dev

 

make scripts

Sucsess!

 

orangepiplus2e:~/v4l2loopback$ make VERBOSE=1
Building v4l2-loopback driver...
make -C /lib/modules/`uname -r`/build M=/home/aaa/v4l2loopback modules
make[1]: Entering directory '/usr/src/linux-headers-4.17.5-sunxi'
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/aaa/v4l2loopback/v4l2loopback.mod.o
  LD [M]  /home/aaa/v4l2loopback/v4l2loopback.ko
make[1]: Leaving directory '/usr/src/linux-headers-4.17.5-sunxi'

 

Sucsess!

 

Thank you!!

Share this post


Link to post
Share on other sites

Great!

 

One more thing. Since you switched to beta.armbian.com repository and since this kernel is getting daily updates ... freeze kernel updates. Possible in armbian-config menu ... or manually (apr-mark).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
0