When i reinstall a sofware via command line

when i run the command i get this

sudo openssl enc -e -a -md sha256 -aes-256-cbc -iter 10000 -salt -pass pass:'DietPiRocks!' -out /var/lib/dietpi/dietpi-software/.GLOBAL_PW.bin
Segmentation fault

oh, ok openssl seems to be broken. Can you execute it alone.

openssl 

sudo openssl
Segmentation fault

you could try to reinstall openssl package

apt install --reinstall openssl

Another error …

dietpi@DietPi:~$ sudo apt install --reinstall openssl
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
Need to get 831 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 https://archive.raspberrypi.org/debian bullseye/main arm64 openssl arm64 1.1.1n-0+deb11u3+rpt1 [831 kB]
Fetched 831 kB in 3s (280 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 74582 files and directories currently installed.)
Preparing to unpack .../openssl_1.1.1n-0+deb11u3+rpt1_arm64.deb ...
Unpacking openssl (1.1.1n-0+deb11u3+rpt1) over (1.1.1n-0+deb11u3+rpt1) ...
Setting up proftpd-core (1.3.7a+dfsg-12+deb11u2) ...
' (notify administrator)known item 'FAILLOG_ENAB
configuration error - unknown item 'LoG_UNKFAIL_ENAB' (notify administrator)
configuration error - unknown item '3' (notify administrator)
configuration error - unknown item 'SIS▒OW_SU_ENAB' (notify administrator)
configuration error - unknown item '"0If' (notify administrator)
configuration error - unknown item '▒' (notify administrator)
configuration error - unknown item 'DEFIULT_HOME' (notify administrator)
configuration error - unknown item '' (notify administrator)
configuration error - unknown item '+' (notify administrator)
configuration error - unknown item '!' (notify administrator)
configuration error - unknown item ''$This' (notify administrator)
configuration error - unknown item ''' (notify administrator)
configuration error - unknown item '▒' (notify administrator)
configuration error - unknown item '!' (notify administrator)
usermod: no changes
Synchronizing state of proftpd.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable proftpd
Job for proftpd.service failed because the control process exited with error code.
See "systemctl status proftpd.service" and "journalctl -xe" for details.
dpkg: error processing package proftpd-core (--configure):
 installed proftpd-core package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of proftpd-mod-crypto:
 proftpd-mod-crypto depends on proftpd-core (= 1.3.7a+dfsg-12+deb11u2); however:
  Package proftpd-core is not configured yet.

dpkg: error processing package proftpd-mod-crypto (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of proftpd-mod-wrap:
 proftpd-mod-wrap depends on proftpd-core (= 1.3.7a+dfsg-12+deb11u2); however:
  Package proftpd-core is not configured yet.

dpkg: error processing package proftpd-mod-wrap (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of proftpd-basic:
 proftpd-basic depends on proftpd-core; however:
  Package proftpd-core is not configured yet.
 proftpd-basic depends on proftpd-mod-wrap; however:
  Package proftpd-mod-wrap is not configured yet.
 proftpd-basic depends on proftpd-mod-crypto; however:
  Package proftpd-mod-crypto is not configured yet.

dpkg: error processing package proftpd-basic (--configure):
 dependency problems - leaving unconfigured
Setting up openssl (1.1.1n-0+deb11u3+rpt1) ...
Errors were encountered while processing:
 proftpd-core
 proftpd-mod-crypto
 proftpd-mod-wrap
 proftpd-basic
E: Sub-process /usr/bin/dpkg returned an error code (1)

there seems to be various data corruption on your system.

not sure if that will fix it, but you can give it a try

> /forcefsck
reboot
# then after reboot
journalctl -t systemd-fsck
root@DietPi:/home/dietpi# journalctl -f systemd-fsck
Failed to add match 'systemd-fsck': Invalid argument
root@DietPi:/home/dietpi# journalctl -t systemd-fsck
-- Journal begins at Sun 2023-02-05 00:01:41 GMT, ends at Sun 2023-02-05 00:19:26 GMT. --
Aug 07 14:25:09 DietPi systemd-fsck[140]: Please pass 'fsck.mode=force' on the kernel command line rather than creating /forcefsck on the root file system.
Feb 05 00:01:41 DietPi systemd-fsck[169]: e2fsck 1.46.2 (28-Feb-2021)
Feb 05 00:01:41 DietPi systemd-fsck[169]: Pass 1: Checking inodes, blocks, and sizes
Feb 05 00:01:43 DietPi systemd-fsck[169]: Pass 2: Checking directory structure
Feb 05 00:01:46 DietPi systemd-fsck[169]: Pass 3: Checking directory connectivity
Feb 05 00:01:46 DietPi systemd-fsck[169]: Pass 4: Checking reference counts
Feb 05 00:01:46 DietPi systemd-fsck[169]: Pass 5: Checking group summary information
Feb 05 00:01:47 DietPi systemd-fsck[169]: /dev/mmcblk0p2: 179603/938400 files (0.2% non-contiguous), 1438142/3756032 blocks
Feb 05 00:01:52 DietPi systemd-fsck[257]: Please pass 'fsck.mode=force' on the kernel command line rather than creating /forcefsck on the root file system.
Feb 05 00:01:53 DietPi systemd-fsck[315]: fsck.fat 4.2 (2021-01-31)
Feb 05 00:01:53 DietPi systemd-fsck[315]: /dev/mmcblk0p1: 375 files, 65139/258077 clusters

reinstall of openssl package is still failing?

Yes
I start an new clean installation now.

But i dont understand what i do wrong i just update my dietpi distro…
This is the second time to force clean new installation.

Thank you for all your help.

I guess you are using an SD card to boot your system? Unfortunately, SD cards are not designed to run on 24/7 systems, and they have a potential to corrupt or damage data. If possible, try to boot from a USB pen stick, HDD or SSD. As well, ensure all your attached USB HDD have an own power supply (or at least a powered USB hub) and not just get powered by the RPi itself. Because RPI USB ports are not designed to provide enough power to operate HDD’s. It might goanna work for a while but could lead to data inconsistence eventually.

Yes i am using sdcard for booting system. I guess i need to buy an externa usb drive with power supply…

Thank you again.

Just for booting your system, a regular USB pen stick would be sufficient. But yeah you could use a powered USB HDD to hold the entire system. Means no need for SD card or pen stick. Depends on personal preferences and of course how much money you like to spend :wink:

1 Like

You can move your root partition to a powered USB, and boot ONLY from the SD card, while the external drive handles the day to day grunt work of read/writing

Move the Raspberry PI root file system to a USB drive - PragmaticLinux
(this method requires a separate linux box and SD card reader)

This way the only time the SD card it touched is at boot time or when an upgrade is performed.

Overview | Using an External Drive as a Raspberry Pi Root Filesystem | Adafruit Learning System
(This one has a script that does it for you and it seems to work very well)

P.S. This works for SSD and NVME → SATA adapters on the USB connections

STICKY: HOWTO: Move the filesystem to a USB stick/Drive - Raspberry Pi Forums
(more explanation on what this is doing)

Ignore the “raspberry pi” stuff…it’s debian, and DietPi is debian

why would you leaf bootFS still on SD card if you could flash the entire system to SSD and boot completely without SD card?

Some SBC’s don’t have the EEPROM to tell the system to boot from SSD/USB like the Raspberry Pi

OP of this topic is using RPi device.