I've just tried an update but I'm getting an error and the web pages appear to have failed. This is the error message displayed at the end of the update process.
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Unable to complete update, please contact Pi-hole Support
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
So I tried
sudo apt --fix-broken install
and got this error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
libevent-2.0-5 libfam0 libfreetype6-dev libpng-dev libpng-tools
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
bsdextrautils
The following NEW packages will be installed:
bsdextrautils
0 upgraded, 1 newly installed, 0 to remove and 1012 not upgraded.
3 not fully installed or removed.
Need to get 0 B/138 kB of archives.
After this operation, 315 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up libstdc++6:armhf (10.2.1-6+rpi1) ...
(Reading database ... 115093 files and directories currently installed.)
Preparing to unpack .../bsdextrautils_2.36.1-8+deb11u1_armhf.deb ...
Unpacking bsdextrautils (2.36.1-8+deb11u1) ...
dpkg: error processing archive /var/cache/apt/archives/bsdextrautils_2.36.1-8+deb11u1_armhf.deb (--unpack):
trying to overwrite '/usr/share/bash-completion/completions/hexdump', which is also in package bash-completion 1:2.1-4.3
Errors were encountered while processing:
/var/cache/apt/archives/bsdextrautils_2.36.1-8+deb11u1_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
pi@raspberrypi:~ $ sudo apt-get -f install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
apt-transport-https libevent-2.0-5 libfam0 libfreetype6-dev libpng-dev libpng-tools
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
bsdextrautils
The following NEW packages will be installed:
bsdextrautils
0 upgraded, 1 newly installed, 0 to remove and 1001 not upgraded.
1 not fully installed or removed.
Need to get 0 B/138 kB of archives.
After this operation, 315 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 115252 files and directories currently installed.)
Preparing to unpack .../bsdextrautils_2.36.1-8+deb11u1_armhf.deb ...
Unpacking bsdextrautils (2.36.1-8+deb11u1) ...
dpkg: error processing archive /var/cache/apt/archives/bsdextrautils_2.36.1-8+deb11u1_armhf.deb (--unpack):
trying to overwrite '/usr/share/bash-completion/completions/hexdump', which is also in package bash-completion 1:2.1-4.3
Errors were encountered while processing:
/var/cache/apt/archives/bsdextrautils_2.36.1-8+deb11u1_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
pi@raspberrypi:~ $ sudo apt-get -f install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
apt-transport-https libevent-2.0-5 libfam0 libfreetype6-dev libpng-dev libpng-tools
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
bsdextrautils
The following NEW packages will be installed:
bsdextrautils
0 upgraded, 1 newly installed, 0 to remove and 1001 not upgraded.
1 not fully installed or removed.
Need to get 0 B/138 kB of archives.
After this operation, 315 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 115252 files and directories currently installed.)
Preparing to unpack .../bsdextrautils_2.36.1-8+deb11u1_armhf.deb ...
Unpacking bsdextrautils (2.36.1-8+deb11u1) ...
dpkg: error processing archive /var/cache/apt/archives/bsdextrautils_2.36.1-8+deb11u1_armhf.deb (--unpack):
trying to overwrite '/usr/share/bash-completion/completions/hexdump', which is also in package bash-completion 1:2.1-4.3
Errors were encountered while processing:
/var/cache/apt/archives/bsdextrautils_2.36.1-8+deb11u1_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I'm thinking of setting up everything from scratch on a new installation. Unfortunately the upgrade has broken the teleport option so I can't export my settings. Is there any way I can manually copy the configuration files?
No problem. I didn't suggest --force-overwrite as an option as it can cause problems and didn't want to be responsible for trashing your install. Hopefully, you won't have any further issues.