Update fails, I’m not sure how to resolve. Any help would be appreciated.
apt update && apt upgrade
Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:2 https://archive.raspberrypi.org/debian buster InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
3 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree
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.3 (>= 1:10.3.34-0+deb10u1) but 1:10.3.31-0+deb10u1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
mariadb-server-10.3
Suggested packages:
mailx mariadb-test netcat-openbsd tinyca
Recommended packages:
libhtml-template-perl
The following packages will be upgraded:
mariadb-server-10.3
1 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
13 not fully installed or removed.
Need to get 0 B/3,575 kB of archives.
After this operation, 17.4 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
(Reading database ... 32886 files and directories currently installed.)
Preparing to unpack .../mariadb-server-10.3_1%3a10.3.34-0+deb10u1_armhf.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.3_1%3a10.3.34-0+deb10u1_armhf.deb (--unpack):
new mariadb-server-10.3 package pre-installation script subprocess returned error exit status 1
mariadb.service is a disabled or a static unit, not starting it.
Errors were encountered while processing:
/var/cache/apt/archives/mariadb-server-10.3_1%3a10.3.34-0+deb10u1_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
That looks all good. Can you check whether the /var/lib/mysql symlink is to the correct dir:
ls -l "$(readlink -f /var/lib/mysql)"
EDIT: It seems to do not, as of “df: /var/lib/mysql/.: No such file or directory”. Did you move your DietPi userdata to an external drive, and is this still attached?
I tried setting up ownCloud at one point and then removed it.
dietpi-software list | grep maria
ID 88 | =2 | MariaDB: Persistent cached file-per-table database server | | https ://dietpi.com/docs/software/databases/#mariadb
List of installed software
[ ] 46 qBittorrent: BitTorrent server with web interface (C++) │
│ [ ] 84 Lighttpd: Extremely lightweight webserver │
│ [ ] 88 MariaDB: Persistent cached file-per-table database server │
│ [ ] 89 PHP: Hypertext Preprocessor for dynamic web content │
│ [ ] 91 Redis: Volatile in-memory non-SQL database server │
│ [ ] 92 Certbot: Obtain and renew Let's Encrypt SSL certs for HTTPS │
│ [ ] 96 Samba Server: Feature-rich SMB/CIFS server │
│ [ ] 103 DietPi-RAMlog: Makes /var/log a RAM disk, preserves file structure on reboot │
│ [ ] 104 Dropbear: Lightweight SSH server │
│ [ ] 130 Python 3: Runtime system, pip package installer and development headers
there are quite some software leftover. if you like, you could try to remove them. I highly recommend to do a backup before
Check the software ID’s if needed or not beforhand
dietpi-software uninstall 84 88 89 91 92 130
You most probably will hit some issues as MariaDB is not running. If yes, select the change command option on the error screen, remove the command and replace it with true. Continue afterwards.
There was Nextcloud or ownCloud installed before? Would explain the webserver stack + Redis. Indeed qBittorrent and Samba do not require any of those .