AGausmann
By:
AGausmann

Linux kernel 3.16 is unavailable through apt-get

May 2, 2015 2.1k views
Miscellaneous Debian
$ uname -a
Linux nonemu 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt9-3~deb8u1 (2015-04-24) x86_64 GNU/Linux

When I tried to install CSF on my VPS, it had problems finding iptables modules:

# perl /usr/local/csf/bin/csftest.pl
Testing ip_tables/iptable_filter...FAILED [FATAL Error: libkmod: ERROR ../libkmod/libkmod.c:554 kmod_search_moddep: could not open moddep file '/lib/modules/3.16.0-4-amd64/modules.dep.bin'] - Required for csf to function
Testing ipt_LOG...FAILED [FATAL Error: libkmod: ERROR ../libkmod/libkmod.c:554 kmod_search_moddep: could not open moddep file '/lib/modules/3.16.0-4-amd64/modules.dep.bin'] - Required for csf to function
Testing ipt_multiport/xt_multiport...FAILED [FATAL Error: libkmod: ERROR ../libkmod/libkmod.c:554 kmod_search_moddep: could not open moddep file '/lib/modules/3.16.0-4-amd64/modules.dep.bin'] - Required for csf to function
Testing ipt_REJECT...FAILED [FATAL Error: libkmod: ERROR ../libkmod/libkmod.c:554 kmod_search_moddep: could not open moddep file '/lib/modules/3.16.0-4-amd64/modules.dep.bin'] - Required for csf to function
Testing ipt_state/xt_state...FAILED [FATAL Error: libkmod: ERROR ../libkmod/libkmod.c:554 kmod_search_moddep: could not open moddep file '/lib/modules/3.16.0-4-amd64/modules.dep.bin'] - Required for csf to function
Testing ipt_limit/xt_limit...FAILED [FATAL Error: libkmod: ERROR ../libkmod/libkmod.c:554 kmod_search_moddep: could not open moddep file '/lib/modules/3.16.0-4-amd64/modules.dep.bin'] - Required for csf to function
Testing ipt_recent...FAILED [Error: libkmod: ERROR ../libkmod/libkmod.c:554 kmod_search_moddep: could not open moddep file '/lib/modules/3.16.0-4-amd64/modules.dep.bin'] - Required for PORTFLOOD and PORTKNOCKING features
Testing xt_connlimit...FAILED [Error: libkmod: ERROR ../libkmod/libkmod.c:554 kmod_search_moddep: could not open moddep file '/lib/modules/3.16.0-4-amd64/modules.dep.bin'] - Required for CONNLIMIT feature
Testing ipt_owner/xt_owner...FAILED [Error: libkmod: ERROR ../libkmod/libkmod.c:554 kmod_search_moddep: could not open moddep file '/lib/modules/3.16.0-4-amd64/modules.dep.bin'] - Required for SMTP_BLOCK and UID/GID blocking features
Testing iptable_nat/ipt_REDIRECT...FAILED [Error: libkmod: ERROR ../libkmod/libkmod.c:554 kmod_search_moddep: could not open moddep file '/lib/modules/3.16.0-4-amd64/modules.dep.bin'] - Required for MESSENGER feature
Testing iptable_nat/ipt_DNAT...FAILED [Error: libkmod: ERROR ../libkmod/libkmod.c:554 kmod_search_moddep: could not open moddep file '/lib/modules/3.16.0-4-amd64/modules.dep.bin'] - Required for csf.redirect feature

After researching it, I found out that my /lib/modules are outdated... The only ones downloaded are 3.2.0-4-amd64, because that is the only kernel locally installed. I tried to install the latest kernel, but it is not available through the DigitalOcean mirrors:

# apt-get install linux-image-
linux-image-2.6-amd64             linux-image-3.2.0-4-amd64-dbg     linux-image-3.2.0-4-rt-amd64-dbg  linux-image-rt-amd64
linux-image-3.2.0-4-amd64         linux-image-3.2.0-4-rt-amd64      linux-image-amd64

This had also broken my OpenVPN server which required iptables modules as well.

Is there any way to install the 3.16.0-4-amd64 kernel to fix the broken dependencies?

1 comment
1 Answer

I just realized what the problem was. I had updated the kernel to debian 8, but the package repositories were still configured for debian 7. Once I changed them, I was flooded with a bunch of updates including a Linux kernel update. That has solved my problem, and both OpenVPN and CSF are running fine.

Have another answer? Share your knowledge.