I always have an error when installing Unbound, tried a new SD card with Raspbian (had Ubuntu Server originally) same thing
pi@raspberrypi:~ $ sudo apt install unbound
Reading package lists... Done
Building dependency tree
Reading state information... Done
unbound is already the newest version (1.9.0-2+deb10u2).
The following package was automatically installed and is no longer required:
rpi-eeprom-images
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@raspberrypi:~ $ sudo systemctl status --full --no-pager unbound
● unbound.service - Unbound DNS server
Loaded: loaded (/lib/systemd/system/unbound.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2020-07-11 20:19:00 BST; 55min ago
Docs: man:unbound(8)
Process: 1448 ExecStartPre=/usr/lib/unbound/package-helper chroot_setup (code=exited, status=1/FAILURE)
Process: 1451 ExecStartPre=/usr/lib/unbound/package-helper root_trust_anchor_update (code=exited, status=1/FAILURE)
Process: 1454 ExecStart=/usr/sbin/unbound -d $DAEMON_OPTS (code=exited, status=1/FAILURE)
Main PID: 1454 (code=exited, status=1/FAILURE)
Jul 11 20:19:00 raspberrypi systemd[1]: unbound.service: Service RestartSec=100ms expired, scheduling restart.
Jul 11 20:19:00 raspberrypi systemd[1]: unbound.service: Scheduled restart job, restart counter is at 8.
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 3,637 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 41245 files and directories currently installed.)
Removing unbound (1.9.0-2+deb10u2) ...
Processing triggers for man-db (2.8.5-2) ...
pi@raspberrypi:~ $ sudo apt install unbound
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
apparmor
The following NEW packages will be installed:
unbound
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 671 kB of archives.
After this operation, 3,637 kB of additional disk space will be used.
Get:1 http://ftp.halifax.rwth-aachen.de/raspbian/raspbian buster/main armhf unbound armhf 1.9.0-2+deb10u2 [671 kB]
Fetched 671 kB in 1s (1,026 kB/s)
Selecting previously unselected package unbound.
(Reading database ... 41213 files and directories currently installed.)
Preparing to unpack .../unbound_1.9.0-2+deb10u2_armhf.deb ...
Unpacking unbound (1.9.0-2+deb10u2) ...
Setting up unbound (1.9.0-2+deb10u2) ...
Job for unbound.service failed because the control process exited with error code.
See "systemctl status unbound.service" and "journalctl -xe" for details.
Job for unbound.service failed because the control process exited with error code.
See "systemctl status unbound.service" and "journalctl -xe" for details.
invoke-rc.d: initscript unbound, action "restart" failed.
● unbound.service - Unbound DNS server
Loaded: loaded (/lib/systemd/system/unbound.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Sat 2020-07-11 21:16:11 BST; 24ms ago
Docs: man:unbound(8)
Process: 3855 ExecStartPre=/usr/lib/unbound/package-helper chroot_setup (code=exited, status=0/SUCCESS)
Process: 3858 ExecStartPre=/usr/lib/unbound/package-helper root_trust_anchor_update (code=exited, status=0/SUCCESS)
Process: 3862 ExecStart=/usr/sbin/unbound -d $DAEMON_OPTS (code=exited, status=1/FAILURE)
Main PID: 3862 (code=exited, status=1/FAILURE)
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for systemd (241-7~deb10u4+rpi1) ...
pi@raspberrypi:~ $
to be honest I just run the command , I noticed this is referenced in sudo journalctl -u unbound.service -b :
Jul 11 21:19:43 raspberrypi package-helper[5682]: /var/lib/unbound/root.key has conteJul 11 21:19:43 raspberrypi package-helper[5682]: success: the anchor is ok
I didn't do much, enabled NTP, changed the timezone from London to Dublin (same time anyway...) and changed the seize of the partition, but it's seems that unbound it's running ok now
pi@raspberrypi:~ $ sudo systemctl start unbound.service
pi@raspberrypi:~ $ sudo systemctl enable unbound.service
Synchronizing state of unbound.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable unbound
pi@raspberrypi:~ $ sudo systemctl status --full --no-pager unbound
● unbound.service - Unbound DNS server
Loaded: loaded (/lib/systemd/system/unbound.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2020-07-11 21:44:04 IST; 3min 19s ago
Docs: man:unbound(8)
Main PID: 675 (unbound)
Tasks: 1 (limit: 4915)
Memory: 11.0M
CGroup: /system.slice/unbound.service
└─675 /usr/sbin/unbound -d
Jul 11 21:44:02 raspberrypi systemd[1]: Starting Unbound DNS server...
Jul 11 21:44:04 raspberrypi package-helper[649]: /var/lib/unbound/root.key has content
Jul 11 21:44:04 raspberrypi package-helper[649]: success: the anchor is ok
Jul 11 21:44:04 raspberrypi systemd[1]: Started Unbound DNS server.
pi@raspberrypi:~ $