Closed ZiggyPi closed 3 years ago
Hi,
Yes there was an issue on Jackett and a new version of Jackett has been released today that should adress this issue. However this not related to the issue running apt
package update. Pls can you try following
/boot/dietpi/func/dietpi-set_software apt-cache clean
apt update
apt upgrade
@Joulinar
No luck
DietPi-Set_software
─────────────────────────────────────────────────────
Mode: apt-cache (clean)
[ OK ] apt-cache clean | Completed
root@DietPi-HTPC:~# apt update
Get:1 http://ppa.launchpad.net/deluge-team/ppa/ubuntu xenial InRelease [17.5 kB]
Get:2 https://downloads.plex.tv/repo/deb public InRelease [6,685 B]
Get:3 https://download.docker.com/linux/raspbian buster InRelease [29.7 kB]Get:4 https://archive.raspberrypi.org/debian buster InRelease [32.9 kB]
Get:5 https://apt.sonarr.tv develop InRelease [13.3 kB]
Get:6 https://download.mono-project.com/repo/debian raspbianbuster InRelease [2,238 B]
Get:7 https://mirror.netcologne.de/raspbian/raspbian buster InRelease [15.0 kB]
Get:8 http://ppa.launchpad.net/deluge-team/ppa/ubuntu xenial/main armhf Packages [3,128 B]
Get:9 https://downloads.plex.tv/repo/deb public/main armhf Packages [1,644 B]
Get:10 https://download.docker.com/linux/raspbian buster/stable armhf Packages [12.0 kB]
Get:11 https://archive.raspberrypi.org/debian buster/main armhf Packages [372 kB]
Get:12 https://download.mono-project.com/repo/debian raspbianbuster/main armhf Packages [47.5 kB]
Get:13 https://apt.sonarr.tv develop/main armhf Packages [109 kB]
Get:14 https://mirror.netcologne.de/raspbian/raspbian buster/rpi armhf Packages [1,360 B]
Get:15 https://mirror.netcologne.de/raspbian/raspbian buster/contrib armhf Packages [58.7 kB]
Get:16 https://mirror.netcologne.de/raspbian/raspbian buster/non-free armhf Packages [104 kB]
Get:17 https://mirror.netcologne.de/raspbian/raspbian buster/main armhf Packages [13.0 MB]
Fetched 13.8 MB in 13s (1,090 kB/s)
Can't locate AptPkg/Cache.pm in @INC (you may need to install the AptPkg::Cache module) (@INC contains: /etc/perl /usr/local/lib/arm-linux-gnueabihf/perl/5.28.1 /usr/local/share/perl/5.28.1 /usr/lib/arm-linux-gnueabihf/perl5/5.28 /usr/share/perl5 /usr/lib/arm-linux-gnueabihf/perl/5.28 /usr/share/perl/5.28 /usr/local/lib/site_perl /usr/lib/arm-linux-gnueabihf/perl-base) at /usr/bin/apt-show-versions line 40.
BEGIN failed--compilation aborted at /usr/bin/apt-show-versions line 40.
Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke-Success 'test -x /usr/bin/apt-show-versions || exit 0 ; apt-show-versions -i'
E: Sub-process returned an error code
hmm there seems to be an issue with apt-show-versions
. Let's try following without hitting YES 😉 to see if there are any dependency before removing.
apt remove apt-show-versions
@Joulinar
Okay so i tried it ans got the following
root@DietPi-HTPC:~# apt-show-versions
Can't locate AptPkg/Cache.pm in @INC (you may need to install the AptPkg::Cache module) (@INC contains: /etc/perl /usr/local/lib/arm-linux-gnueabihf/perl/5.28.1 /usr/local/share/perl/5.28.1 /usr/lib/arm-linux-gnueabihf/perl5/5.28 /usr/share/perl5 /usr/lib/arm-linux-gnueabihf/perl/5.28 /usr/share/perl/5.28 /usr/local/lib/site_perl /usr/lib/arm-linux-gnueabihf/perl-base) at /usr/bin/apt-show-versions line 40.
BEGIN failed--compilation aborted at /usr/bin/apt-show-versions line 40.
root@DietPi-HTPC:~# apt remove apt-show-versions
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'apt-show-versions' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
So i tried installing it and got the following error
root@DietPi-HTPC:~# aptitude install apt-show-versions
The following NEW packages will be installed:
apt-show-versions libapt-pkg-perl{a}
0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 98.5 kB of archives. After unpacking 299 kB will be used.
Do you want to continue? [Y/n/?] y
Get: 1 https://mirror.netcologne.de/raspbian/raspbian buster/main armhf libapt-pkg-perl armhf 0.1.34+b1 [65.9 kB]
Get: 2 https://mirror.netcologne.de/raspbian/raspbian buster/main armhf apt-show-versions all 0.22.11 [32.6 kB]
Fetched 98.5 kB in 0s (262 kB/s)
dpkg: unrecoverable fatal error, aborting:
unknown system group 'ssl-cert' in statoverride file; the system group got removed
before the override, which is most probably a packaging bug, to recover youcan remove the override manually with dpkg-statoverride
E: Sub-process /usr/bin/dpkg returned an error code (2)
@MichaIng
can you have a look. There seems to be something broken on apt
Similar problem with fetch with apt
preventing update from v6.34.3 to v6.35.0, submitted the error:
Failed to fetch https://packages.sury.org/php/pool/main/p/php-defaults/phpcommon_81+0~20210223.34+debian10~1.gbpf52eb0_all.deb
@wilsonmsalberto
well your issue seems to be different. Can you share full output of apt update && apt upgrade
pls
@Joulinar https://pastebin.com/M53mkDrM
Thanks for checking in!
ok the PGP key for PHP repository got invalid
Err:4 https://packages.sury.org/php buster InRelease
The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key <deb@sury.org>
Reading package lists... Done
similar to #4235
You can try following to fix
apt-key del '95BD4743'
curl -sSfL 'https://packages.sury.org/php/apt.gpg' -o /etc/apt/trusted.gpg.d/dietpi-php.gpg
/boot/dietpi/func/dietpi-set_software apt-cache clean
apt update
apt upgrade
Thank you! Seems to be updating everything properly, will confirm after the fact.
wow you have 213 packages that can be upgraded. Are you going to perform a full system upgrade from Stretch to Buster? I hope you created a backup before 😉
I did backup, yes. I've only been using the dietpi-update command, don't usually run anything else.
But, everything is working after the update, all is well that ends well. Thanks for all the help!
@Joulinar
Tried it, but still same result
root@DietPi-HTPC:~# apt-key del '95BD4743'
OK
root@DietPi-HTPC:~# curl -sSfL 'https://packages.sury.org/php/apt.gpg' -o /etc/apt/trusted.gpg.d/dietpi-php.gpg
root@DietPi-HTPC:~# /boot/dietpi/func/dietpi-set_software apt-cache clean
DietPi-Set_software
─────────────────────────────────────────────────────
Mode: apt-cache (clean)
[ OK ] apt-cache clean | Completed
root@DietPi-HTPC:~# apt update
Get:1 http://ppa.launchpad.net/deluge-team/ppa/ubuntu xenial InRelease [17.5 kB]
Get:2 https://downloads.plex.tv/repo/deb public InRelease [6,685 B]
Get:3 https://download.docker.com/linux/raspbian buster InRelease [29.7 kB]Get:4 https://apt.sonarr.tv develop InRelease [13.3 kB]
Get:5 https://download.mono-project.com/repo/debian raspbianbuster InRelease [2,238 B]
Get:6 https://mirror.netcologne.de/raspbian/raspbian buster InRelease [15.0 kB]
Get:7 https://archive.raspberrypi.org/debian buster InRelease [32.9 kB]
Get:8 https://downloads.plex.tv/repo/deb public/main armhf Packages [1,644 B]
Get:9 http://ppa.launchpad.net/deluge-team/ppa/ubuntu xenial/main armhf Packages [3,128 B]
Get:10 https://download.docker.com/linux/raspbian buster/stable armhf Packages [12.0 kB]
Get:11 https://download.mono-project.com/repo/debian raspbianbuster/main armhf Packages [47.5 kB]
Get:12 https://apt.sonarr.tv develop/main armhf Packages [109 kB]
Get:13 https://mirror.netcologne.de/raspbian/raspbian buster/contrib armhf Packages [58.7 kB]
Get:14 https://mirror.netcologne.de/raspbian/raspbian buster/rpi armhf Packages [1,360 B]
Get:15 https://mirror.netcologne.de/raspbian/raspbian buster/non-free armhf Packages [104 kB]
Get:16 https://mirror.netcologne.de/raspbian/raspbian buster/main armhf Packages [13.0 MB]
Get:17 https://archive.raspberrypi.org/debian buster/main armhf Packages [372 kB]
Fetched 13.8 MB in 13s (1,086 kB/s)
Can't locate AptPkg/Cache.pm in @INC (you may need to install the AptPkg::Cache module) (@INC contains: /etc/perl /usr/local/lib/arm-linux-gnueabihf/perl/5.28.1 /usr/local/share/perl/5.28.1 /usr/lib/arm-linux-gnueabihf/perl5/5.28 /usr/share/perl5 /usr/lib/arm-linux-gnueabihf/perl/5.28 /usr/share/perl/5.28 /usr/local/lib/site_perl /usr/lib/arm-linux-gnueabihf/perl-base) at /usr/bin/apt-show-versions line 40.
BEGIN failed--compilation aborted at /usr/bin/apt-show-versions line 40.
Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke-Success 'test -x /usr/bin/apt-show-versions || exit 0 ; apt-show-versions -i'
E: Sub-process returned an error code
root@DietPi-HTPC:~# apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Is there a specific reason for using apt-show-versions
? I reviewed it a while back where it was a dependency of Webmin, but it had only downsides and can easily completely be replaced by native apt-cache
and apt list
calls, which are much faster as well. As a result Webmin has removed it from their dependencies.
I see you installed it above, but actually it obviously was somehow installed before already, at least the APT calls tried to invoke it, meaning there was a hook in /etc/apt/apt.conf.d
.
Please try:
apt purge apt-show-versions
ls -l /etc/apt/apt.conf.d # Check if there is still a hook for apt-show-versions
apt update
@MichaIng
Still no change
root@DietPi-HTPC:~# apt purge apt-show-versions
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'apt-show-versions' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@DietPi-HTPC:~# ls -l /etc/apt/apt.conf.d # Check if there is still a hook for apt-show-versions
total 32
-r--r--r-- 1 root root 440 Dec 24 2019 01autoremove-kernels
-rw-r--r-- 1 root root 162 Feb 16 2019 20apt-show-versions
-rw-r--r-- 1 root root 182 Jul 14 2019 70debconf
-rw-r--r-- 1 root root 1370 Mar 11 17:06 97dietpi
-rw-r--r-- 1 root root 27 Dec 24 2019 98-dietpi-no_translations
-rw-r--r-- 1 root root 62 Jul 14 2019 99-dietpi-forceconf
-rw-r--r-- 1 root root 27 Jul 14 2019 99-dietpi-force-ipv4
-rw-r--r-- 1 root root 154 Jul 14 2019 99-dietpi-norecommends
root@DietPi-HTPC:~# apt update
Hit:1 https://downloads.plex.tv/repo/deb public InRelease
Hit:2 https://mirror.netcologne.de/raspbian/raspbian buster InRelease
Hit:3 https://download.docker.com/linux/raspbian buster InRelease
Hit:4 https://archive.raspberrypi.org/debian buster InRelease
Hit:5 https://apt.sonarr.tv develop InRelease
Hit:6 http://ppa.launchpad.net/deluge-team/ppa/ubuntu xenial InRelease
Hit:7 https://download.mono-project.com/repo/debian raspbianbuster InRelease
Can't locate AptPkg/Cache.pm in @INC (you may need to install the AptPkg::Cache module) (@INC contains: /etc/perl /usr/local/lib/arm-linux-gnueabihf/perl/5.28.1 /usr/local/share/perl/5.28.1 /usr/lib/arm-linux-gnueabihf/perl5/5.28 /usr/share/perl5 /usr/lib/arm-linux-gnueabihf/perl/5.28 /usr/share/perl/5.28 /usr/local/lib/site_perl /usr/lib/arm-linux-gnueabihf/perl-base) at /usr/bin/apt-show-versions line 40.
BEGIN failed--compilation aborted at /usr/bin/apt-show-versions line 40.
Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke-Success 'test -x /usr/bin/apt-show-versions || exit 0 ; apt-show-versions -i'
E: Sub-process returned an error code
Do the following:
rm /etc/apt/apt.conf.d/20apt-show-versions
apt update
@MichaIng
This seems to have done the trick, atleast for the most part. A couple of services still failed and cant reach sonarr or jackett via IP. Radarr en deluge are reachable via IP.
ok the apt
issue is gone. For the failing serviced you would need to check one by one why they are failing.
@Joulinar
This maybe a noob question, but how would i begin doing that?
let's check what services we have in total dietpi-services status
@Joulinar
As instructed... FYI my dietpi is only connected via wifi.
do you use an external disk where you moved part of the system on?
let's check lighttpd
/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf
There is a lot of missing or unexpectedly changed (and the falsely existing one) files it seems. So before going through the individual services, please also check for kernel errors. Probably the file system itself is corrupted, causing everything else:
dmesg -l emerg,alert,crit,err
@Joulinar
I have an external hdd what was mounted as HTPC. But this mount appears to be gone. This was only used to store all the downloads for deluge and tv shows en movies for sonarr and radarr.
Looks like you had phpMyAdmin installed and its Lighttpd config is still enabled while not being present anymore. We migrated from the Debian APT package to a source-based install, and possibly purging the package did not cleanly remove the Lighttpd config.
Just to assure:
dpkg -l phpmyadmin
dietpi-software list | grep phpmyadmin
To remove the invalid symlink:
rm /etc/lighttpd/conf-enabled/50-phpmyadmin.conf
Looks like we need to remove that one manually. I'll do tests with Apache2 as well. Not much pre-v6.26 users exist anymore, I guess, but removing some definitely false symlinks after the package purge is easy to add.
Please still run and paste the output of the command suggested above: #issuecomment-814001887
@MichaIng
Okay, no important kernel errors at least. Strange thing with the phpMyAdmin config, as the symlink does not exist. Does the lighttpd.conf load it directly?
cat /etc/lighttpd/lighttpd.conf
@MichaIng
Mysterious. What is the content of the other drop-in configs?
for i in /etc/lighttpd/conf-enabled/*.conf; do echo "${i}:"; cat "$i"; done
@MichaIng
/etc/lighttpd/conf-enabled/50-phpmyadmin.conf:
cat: /etc/lighttpd/conf-enabled/50-phpmyadmin.conf: No such file or directory
There is something, but it cannot be removed? What is this?
ls -l /etc/lighttpd/conf-enabled/
ls -l /etc/lighttpd/conf-enabled/50-phpmyadmin.conf
rm -R /etc/lighttpd/conf-enabled/50-phpmyadmin.conf
@MichaIng
So now it was removed it seems. The original file can be removed as well:
rm /etc/lighttpd/conf-available/50-phpmyadmin.conf
Now try again to restart Lighttpd:
systemctl restart lighttpd
sleep 1
systemctl status lighttpd
@MichaIng
looks like web server Lighttpd is running again
One thing to have some security headers effective for Nextcloud, please run:
G_CONFIG_INJECT '"mod_setenv",' ' "mod_setenv",' /etc/lighttpd/lighttpd.conf '"mod_.+",'
Not sure why it's missing, since we add this actively during install. Sadly Lighttpd has problems when mods are added multiple times, else we could add it to the Nextcloud drop-in config directly.
Let's check the Redis server, which is required to run Nextcloud:
journalctl -u redis-server
@MichaIng
Nothing happens with the config injection
root@DietPi-HTPC:~# G_CONFIG_INJECT '"mod_setenv",' '
>
> ^C
root@DietPi-HTPC:~# journalctl -u redis-server
-- Logs begin at Tue 2021-04-06 18:05:05 CEST, end at Wed 2021-04-07 17:40:20 CEST. --
-- No entries --
BTW i was planning on using nextxloud but javent come around configering. So dietpi is only just for sonarr radarr jackett deluge plex and samba at the moment. Idealy i would also like to use it for nextcloud en reverse proxy for htpc manager.
If you like to use Revers Proxy it might be better to go with Nginx instead of Lighttpd. But this would require a reinstallation of Nextcloud along with Nginx
I almost would think that een complete reinstall would be better. But it has been a lot of work already to get radarr sonarr jackett deluge and samba runninf with an external mounted hdd. And on a headless rpi4
Nothing happens with the config injection
Jep that is fine. It is nothing visible, just some HTTP response headers for hardening. Although it seems you copied only half of the line?
-- No entries --
Try to restart the Redis server to produce fresh logs:
systemctl restart redis-server
sleep 1
journalctl -u redis-server
I almost would think that een complete reinstall would be better.
Possible. Hard to say what would take longer. It also depends a bit on the personal learning preference 😉. Debugging and fixing each service implies learning some basics around debugging, the services and their config files. A fresh install could be used as encouragement to create text files or even better scripts with the commands/steps you did to setup the system. Ideally these scripts can stored on a USB stick or on a Git repository, from where they can be executed even automatically on first boot of the fresh DietPi system via /boot/dietpi.txt
AUTO_SETUP_CUSTOM_SCRIPT_EXEC
option 🙂.
@MichaIng
Yeah i rather not do a fresh install.
Reinstalling would mean doing all the tutorials again because it has been such a long time okay.
So lets see what this debugging gets us.
I already learned the propper way to post in the comments so that's a good start 😁
It cannot find a certain required library. Strangely the related DEB package is a hard dependency of the redis-tools package and should hence be installed in any case. But let's see if it is really missing and as a generic fix reinstall the package.
ls -l /usr/lib/arm-linux-gnueabihf/libjemalloc.so.2
apt install --reinstall libjemalloc2
systemctl restart redis-server
sleep 1
journalctl -u redis-server
@MichaIng
Was this a Stretch or even Jessie system once, that you upgraded, or did you flash a Buster image in the first place? The system state and the installed packages somehow do not match. The ssl-cert
group is created by the ssl-cert
package (an optional one, not pre-installed), along with the statoverride, but while the statoverride exists, the group does obviously not. And I'm wondering how such a state can happen without manually removing files or groups.
Let's go a conservative way and verify first the case:
dpkg-statoverride --list
getent group ssl-cert
@MichaIng
I have absolutely no idea what version i installed. I bought rpi4 about 3 or 4 years ago and downloaded dietpi from the website and did een fresh install and installed the software via dietpi-software.
And run apt-get update && apt-get upgrade once in a while.
root@DietPi-HTPC:~# dpkg-statoverride --list
root crontab 2755 /usr/bin/crontab
root root 1733 /var/lib/php/sessions
root ssl-cert 710 /etc/ssl/private
debian-deluged debian-deluged 750 /var/lib/deluged/config
debian-deluged adm 2750 /var/log/deluged
root messagebus 4754 /usr/lib/dbus-1.0/dbus-daemon-launch-helper
debian-deluged debian-deluged 750 /var/lib/deluged
redis redis 640 /etc/redis/redis.conf
root@DietPi-HTPC:~# getent group ssl-cert
3-4 years could be Stretch that time. Maybe thinks get messed up during Buster upgrade?
Probably. Is the RPi 4 already available for 3-4 years? However, lets fix the statoverride:
dpkg-statoverride --remove /etc/ssl/private
apt install --reinstall libjemalloc2
systemctl restart redis-server
sleep 1
journalctl -u redis-server
@MichaIng
I checked my receipt and i bought it december 2019.
And I just remember that Raspbian Stretch never worked on RPi 4. The release of RPi 4 was the reason for the early release of Raspberry Pi OS Buster, prior to Debian Buster.
Okay, Redis is running now. Let's go on with Coturn:
systemctl restart coturn
sleep 1
journalctl -u coturn
@MichaIng
Details:
Steps to reproduce:
Expected behaviour:
Actual behaviour:
Extra details:
Any idea how i can resolve this. I dont really need the update. But i was hoping it would fix jackett. But now i can get the terminal up but nothing else is working. No access to sonarr, radarr or other webservices and no acceas to samba.
Additional logs: