I tried to install iptables-persistent without success. I checked the dependent packages and tried to install them manually but it is also not working.

What I tried:

sudo apt-get install iptables-persistent -y  

Reading package lists... Done
Building dependency tree       
Reading state information... Done
iptables-persistent is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up netfilter-persistent (1.0.3+deb8u1) ...
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
A dependency job for netfilter-persistent.service failed. See 'journalctl -xn' for details.
invoke-rc.d: initscript netfilter-persistent, action "start" failed.
dpkg: error processing package netfilter-persistent (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of iptables-persistent: iptables-persistent depends on netfilter-persistent (= 1.0.3+deb8u1); however: Package netfilter-persistent is not configured yet.

dpkg: error processing package iptables-persistent (--configure): dependency problems - leaving unconfigured
Errors were encountered while processing:

netfilter-persistent iptables-persistent E: Sub-process /usr/bin/dpkg returned an error code (1)

And the log:

sudo journalctl -xn      

-- Logs begin at Mon 2017-03-20 22:11:46 WET, end at Mon 2017-03-20 22:17:57 WET. --
Mar 20 22:17:40 prio systemd-modules-load[2274]: Failed to find module 'spi-dev'
Mar 20 22:17:40 prio systemd[1]: systemd-modules-load.service: main process exited, code=exited, status=1/FAILURE
Mar 20 22:17:40 prio systemd[1]: Failed to start Load Kernel Modules.
-- Subject: Unit systemd-modules-load.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Unit systemd-modules-load.service has failed.
-- The result is failed.
Mar 20 22:17:40 prio systemd[1]: Dependency failed for netfilter persistent configuration.
-- Subject: Unit netfilter-persistent.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Unit netfilter-persistent.service has failed.
-- The result is dependency.
Mar 20 22:17:40 prio systemd[1]: Unit systemd-modules-load.service entered failed state.
Mar 20 22:17:50 prio sudo[2202]: pam_unix(sudo:session): session closed for user root
Mar 20 22:17:53 prio kernel: w1_master_driver w1_bus_master1: Family 0 for 00.600000000000.65 is not registered.
Mar 20 22:17:57 prio sudo[2309]: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/bin/journalctl -xn
Mar 20 22:17:57 prio sudo[2309]: pam_unix(sudo:session): session opened for user root by (uid=0)

About my sistem:

Raspbian Jessie - release 8.0


I editted the /etc/modules-load.d/cups-filters.conf file and commented out lp, ppdev, and parport_pc with a # in front of each line. I don't intend on printing to anywhere from the Pi, so no harm done I think. I suppose the netfilter tries to load the parallel port and/or centronics ports from ages past when those could act as a sort of network. That is just guessing though. I rebooted and then tried to install iptables-persistent and netfilter-persistent again and they went through.

sudo vi /etc/modules-load.d/cups-filters.conf

Comment out lp, ppdev, parport_pc so it looks like this:

# Parallel printer driver modules loading for cups
# LOAD_LP_MODULE was 'yes' in /etc/default/cups

Save and exit, reboot:

sudo reboot now

It should let you run your install again after that.

I found the info at this site here:

OSMC Forums: “failed to start load kernel modules” https://discourse.osmc.tv/t/failed-to-start-load-kernel-modules/3163/15

edit: forgot to mention this is on a Raspberry Pi running Jessie. I have Pixel or whatever desktop it comes with on it too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.