Can't install anything anymore

Haven’t SSH’ed into my RPi 4 in a few weeks.
Just did so, ran apt update and apt upgrade.

Then when I try to install stuff, it throws an error every time.
I uploaded one of them to you guys - Reference code: 922a2732-1225-4a81-aa47-a8a7dea5b6fe

Tried both under sudo user and root accounts. Tried installing MineOS, Open Java, maybe something else - everything is failing:

- DietPi has encountered an error                                   -
- Please create a ticket: https://github.com/MichaIng/DietPi/issues -
- Copy and paste only the BLUE lines below into the ticket          -
---------------------------------------------------------------------
#### Details:
- Date           | Mon Aug 14 12:36:58 EDT 2023
- Bug report     | 922a2732-1225-4a81-aa47-a8a7dea5b6fe
- DietPi version | v8.20.1 (MichaIng/master)
- Image creator  |
- Pre-image      |
- Hardware       | RPi 4 Model B (aarch64) (ID=4)
- Kernel version | `Linux pi4-8-1 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64 GNU/Linux`
- Distro         | bookworm (ID=7,RASPBIAN=0)
- Command        | `apt-get -y --allow-change-held-packages install openjdk-17-jre-headless`
- Exit code      | 100
- Software title | DietPi-Software
#### Steps to reproduce:
<!-- Explain how to reproduce the issue -->
1. ...
2. ...
#### Expected behaviour:
<!-- What SHOULD happen? -->
- ...
#### Actual behaviour:
<!-- What IS happening? -->
- ...
#### Extra details:
<!-- Please post any extra details that might help solve the issue -->
- ...
#### Additional logs:

Reading package lists...
Building dependency tree...
Reading state information...
openjdk-17-jre-headless is already the newest version (17.0.8+7-1~deb12u1).
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 ca-certificates-java (20230103) ...
Exception in thread "main" java.lang.InternalError: Error loading java.security file
        at java.base/java.security.Security.initialize(Security.java:106)
        at java.base/java.security.Security$1.run(Security.java:84)
        at java.base/java.security.Security$1.run(Security.java:82)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
        at java.base/java.security.Security.<clinit>(Security.java:82)
        at java.base/sun.security.jca.ProviderList.<init>(ProviderList.java:178)
        at java.base/sun.security.jca.ProviderList$2.run(ProviderList.java:96)
        at java.base/sun.security.jca.ProviderList$2.run(ProviderList.java:94)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
        at java.base/sun.security.jca.ProviderList.fromSecurityProperties(ProviderList.java:93)
        at java.base/sun.security.jca.Providers.<clinit>(Providers.java:55)
        at java.base/sun.security.jca.GetInstance.getInstance(GetInstance.java:156)
        at java.base/java.security.cert.CertificateFactory.getInstance(CertificateFactory.java:193)
        at org.debian.security.KeyStoreHandler.<init>(KeyStoreHandler.java:50)
        at org.debian.security.UpdateCertificates.<init>(UpdateCertificates.java:65)
        at org.debian.security.UpdateCertificates.main(UpdateCertificates.java:51)
dpkg: error processing package ca-certificates-java (--configure):
 installed ca-certificates-java package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of openjdk-17-jre-headless:arm64:
 openjdk-17-jre-headless:arm64 depends on ca-certificates-java (>= 20190405~); however:
  Package ca-certificates-java is not configured yet.

dpkg: error processing package openjdk-17-jre-headless:arm64 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 ca-certificates-java
 openjdk-17-jre-headless:arm64
E: Sub-process /usr/bin/dpkg returned an error code (1)

this is weird: my NetData and portainer services are offline too. WTF is going on. I RDP’ed into it, and forefox opening websites fine, so it’s not like it’s cut off from internet.

samba also down O_O

nvm, services stopped because of the buggy install - software script stops services, fails to install, and then fails to resume services. Reboot re-activated netdata etc.

The installation issue is still open though.

UPD:
netdata working, but portainer is actually toast:

# docker ps
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
#

I was able to launch it, but docker logs portainer did not produce anything as to why it stopped in the 1st place.
WTF is going on :frowning:

I guess service has been stopped for the software installation you tried. Simply do

dietpi-services restart 

As the software installation did not finished, they stay offline.

Your initial issue is an apt package not successfully finished and stuck. This now prevents to install other software. Something to be fixed first.

Can you post full output of

apt update
apt upgrade 
1 Like

update:

# apt update
Hit:1 https://download.docker.com/linux/debian bookworm InRelease
Hit:2 https://deb.debian.org/debian bookworm InRelease
Hit:3 https://deb.debian.org/debian bookworm-updates InRelease
Hit:4 https://deb.debian.org/debian-security bookworm-security InRelease
Hit:5 https://deb.debian.org/debian bookworm-backports InRelease
Get:6 https://paulcarroty.gitlab.io/vscodium-deb-rpm-repo/debs vscodium InRelease [3837 B]
Hit:7 https://archive.raspberrypi.org/debian bullseye InRelease
Fetched 3837 B in 3s (1176 B/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.

upgrade:

# apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
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.
Do you want to continue? [Y/n] y
Setting up ca-certificates-java (20230103) ...
Exception in thread "main" java.lang.InternalError: Error loading java.security file
        at java.base/java.security.Security.initialize(Security.java:106)
        at java.base/java.security.Security$1.run(Security.java:84)
        at java.base/java.security.Security$1.run(Security.java:82)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
        at java.base/java.security.Security.<clinit>(Security.java:82)
        at java.base/sun.security.jca.ProviderList.<init>(ProviderList.java:178)
        at java.base/sun.security.jca.ProviderList$2.run(ProviderList.java:96)
        at java.base/sun.security.jca.ProviderList$2.run(ProviderList.java:94)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
        at java.base/sun.security.jca.ProviderList.fromSecurityProperties(ProviderList.java:93)
        at java.base/sun.security.jca.Providers.<clinit>(Providers.java:55)
        at java.base/sun.security.jca.GetInstance.getInstance(GetInstance.java:156)
        at java.base/java.security.cert.CertificateFactory.getInstance(CertificateFactory.java:193)
        at org.debian.security.KeyStoreHandler.<init>(KeyStoreHandler.java:50)
        at org.debian.security.UpdateCertificates.<init>(UpdateCertificates.java:65)
        at org.debian.security.UpdateCertificates.main(UpdateCertificates.java:51)
dpkg: error processing package ca-certificates-java (--configure):
 installed ca-certificates-java package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of openjdk-17-jre-headless:arm64:
 openjdk-17-jre-headless:arm64 depends on ca-certificates-java (>= 20190405~); however:
  Package ca-certificates-java is not configured yet.

dpkg: error processing package openjdk-17-jre-headless:arm64 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 ca-certificates-java
 openjdk-17-jre-headless:arm64
E: Sub-process /usr/bin/dpkg returned an error code (1)

can you try following

apt install --reinstall ca-certificates-java