Cannot upgrade rpi4

Required Information

  • DietPi version | cat /boot/dietpi/.version
G_DIETPI_VERSION_CORE=8
G_DIETPI_VERSION_SUB=16
G_DIETPI_VERSION_RC=2
G_GITBRANCH='master'
G_GITOWNER='MichaIng'
G_LIVE_PATCH_STATUS[0]='not applicable'
  • Distro version | echo $G_DISTRO_NAME $G_RASPBIAN: bullseye 0
  • Kernel version | Linux DietPi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
  • Architecture | arm64
  • SBC model | RPi 4 Model B (aarch64)
  • Power supply used | 5V
  • SD card used | SanDisk ultra)

Additional Information (if applicable)

  • Software title | mariadb cannot upgrade
[  OK  ] DietPi-Update | APT update
[ INFO ] DietPi-Update | APT upgrade, please wait...
Reading package lists...
Building dependency tree...
Reading state information...
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 mariadb-server : Depends: mariadb-server-10.5 (>= 1:10.5.19-0+deb11u2) but 1:10.5.18-0+deb11u1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
[FAILED] DietPi-Update | APT upgrade
 - Command: apt-get -y --with-new-pkgs upgrade

---------------------------------------------------------------------
- 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 May  8 11:46:46 CEST 2023
- DietPi version | v8.16.2 (MichaIng/master)
- Image creator  | 
- Pre-image      | 
- Hardware       | RPi 4 Model B (aarch64) (ID=4)
- Kernel version | `Linux DietPi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64 GNU/Linux`
- Distro         | debian 11
- Command        | `dietpi-update`
- Exit code      | 100
- Software title | DietPi-Update
#### Steps to reproduce:
<!-- Explain how to reproduce the issue -->
1. `sudo dietpi-update`
#### Expected behaviour:
<!-- What SHOULD happen? -->
upgrade
#### Actual behaviour:
<!-- What IS happening? -->
Error during installation to last version


#### Additional logs:

Reading package lists…
Building dependency tree…
Reading state information…
You might want to run ‘apt --fix-broken install’ to correct these.
The following packages have unmet dependencies:
mariadb-server : Depends: mariadb-server-10.5 (>= 1:10.5.19-0+deb11u2) but 1:10.5.18-0+deb11u1 is installed
E: Unmet dependencies. Try ‘apt --fix-broken install’ with no packages (or specify a solution).

---------------------------------------------------------------------
[FAILED] DietPi-Update | Unable to continue, DietPi-Update will now terminate.

dietpi@DietPi:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 mariadb-server : Depends: mariadb-server-10.5 (>= 1:10.5.19-0+deb11u2) but 1:10.5.18-0+deb11u1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
dietpi@DietPi:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  mariadb-server-10.5
Suggested packages:
  mailx mariadb-test
Recommended packages:
  libhtml-template-perl
The following packages will be upgraded:
  mariadb-server-10.5
1 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
12 not fully installed or removed.
Need to get 4114 kB of archives.
After this operation, 15.4 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 https://deb.debian.org/debian bullseye/main arm64 mariadb-server-10.5 arm64 1:10.5.19-0+deb11u2 [4114 kB]
Fetched 4114 kB in 1s (4894 kB/s)            
Preconfiguring packages ...
(Reading database ... 42997 files and directories currently installed.)
Preparing to unpack .../mariadb-server-10.5_1%3a10.5.19-0+deb11u2_arm64.deb ...
df: /var/lib/mysql/.: No such file or directory
ERROR: There's not enough space in /var/lib/mysql/
dpkg: error processing archive /var/cache/apt/archives/mariadb-server-10.5_1%3a10.5.19-0+deb11u2_arm64.deb (--
unpack):
 new mariadb-server-10.5 package pre-installation script subprocess returned error exit status 1
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.
Errors were encountered while processing:
 /var/cache/apt/archives/mariadb-server-10.5_1%3a10.5.19-0+deb11u2_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Regards

Your HDD is gone? Or full?

Hi, it looks OK:

dietpi@DietPi:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        30G   20G  8.3G  71% /
devtmpfs        916M     0  916M   0% /dev
tmpfs           950M  736K  949M   1% /dev/shm
tmpfs           380M   41M  340M  11% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           1.0G     0  1.0G   0% /tmp
tmpfs            50M   88K   50M   1% /var/log
/dev/mmcblk0p1  127M   32M   95M  26% /boot
tmpfs           190M     0  190M   0% /run/user/998
tmpfs           190M     0  190M   0% /run/user/1000

If I recall correctly, you have a couple of HDD’s attached. They seems to be missing.

No, that is different device now. In another apartment. No drives attached. Only sd-card.

can you share following

readlink /var/lib/mysql
readlink -f /var/lib/mysql
ls -la /var/lib/mysql
readlink /var/lib/mysql
/mnt/dietpi_userdata/mysql
 
readlink -f /var/lib/mysql
/mnt/dietpi_userdata/mysql

ls -la /var/lib/mysql
lrwxrwxrwx 1 root root 26 Aug 12  2022 /var/lib/mysql -> /mnt/dietpi_userdata/mysql

can you share this one as well

ls -la /mnt/dietpi_userdata/mysql

ls: cannot access '/mnt/dietpi_userdata/mysql': No such file or directory

hmm did you removed this one? Do you have a backup?

I don’t remember I remove it. Meybe when I install Pi-Hole and Pi-Alert it removed.
I have only daily dietpi-backups.

have a look to your backup folder if there is still something in.

Unfortunately I don’t have.
Meybe that is because I move that device from my home network to another apartment.

A physical move from one location to another does not remove files/folders from your device. Without a backup, you have no chance of getting your data back. You could try creating an empty database by reinstalling MariaDB

dietpi-software reinstall 88
1 Like

Thanks, I reinstall and after second try command apt fix broken worked.
Then I update.
Thanks.