• Support
  • Ubuntu 24.04 update/upgrade and package installation via command failed

I have an issue. I want to update/upgrade server or install some packages from command line on Ubuntu 24.x but it is stuck with the mariadb-common file that I installed aaPanel with. How can I fix this?

Here's the error log:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
3 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  linux-image-6.8.0-55-generic linux-modules-6.8.0-55-generic linux-modules-extra-6.8.0-55-generic linux-tools-6.8.0-55
Use 'apt autoremove' to remove them.
The following upgrades have been deferred due to phasing:
  rsyslog update-notifier update-notifier-common
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up mariadb-common (1:10.11.11-0ubuntu0.24.04.2) ...
update-alternatives: error: alternative path /etc/mysql/mariadb.cnf doesn't exist
dpkg: error processing package mariadb-common (--configure):
 installed mariadb-common package post-installation script subprocess returned error exit status 2
dpkg: dependency problems prevent configuration of libmariadb3:amd64:
 libmariadb3:amd64 depends on mariadb-common; however:
  Package mariadb-common is not configured yet.

dpkg: error processing package libmariadb3:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of mariadb-client-core:
 mariadb-client-core depends on libmariadb3 (>= 10.5.4); however:
  Package libmariadb3:amd64 is not configured yet.
 mariadb-client-core depends on mariadb-common (>= 1:10.11.11-0ubuntu0.24.04.2); however:
  Package mariadb-common is not configured yet.

dpkg: error processing package mariadb-client-core (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of mariadb-client:
 mariadb-client depends on mariadb-client-core (>= 1:10.11.11-0ubuntu0.24.04.2); however:
  Package mariadb-client-core is not configured yet.

dpkg: error processing packNo apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                                                     No apport report written because the error message indicates its a followup error from a previous failure.
                         No apport report written because MaxReports is reached already
                                                                                       age mariadb-client (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mariadb-common
 libmariadb3:amd64
 mariadb-client-core
 mariadb-client
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@localhost:~#
  • Hello, is it normal to try to install mariadb-common manually?
    Or try to create the file first and then install it

    sudo mkdir /etc/mysql
    sudo touch /etc/mysql/mariadb.cnf

Hello, is it normal to try to install mariadb-common manually?
Or try to create the file first and then install it

sudo mkdir /etc/mysql
sudo touch /etc/mysql/mariadb.cnf

    aaPanel_Kern
    It still does get that error:

    update-alternatives: error: alternative path /etc/mysql/mariadb.cnf doesn't exist
    dpkg: error processing package mariadb-common (--configure):
     installed mariadb-common package post-installation script subprocess returned error exit status 2
    No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                              dpkg: dependency problems prevent configuration of libmariadb3:amd64:
     libmariadb3:amd64 depends on mariadb-common; however:
      Package mariadb-common is not configured yet.
    
    dpkg: error processing package libmariadb3:amd64 (--configure):
     dependency problems - leaving unconfigured
    dpkg: dependency problems prevent configuration of mariadb-client-core:
     mariadb-client-core depends on libmariadb3 (>= 10.5.4); however:
      Package libmariadb3:amd64 is not configured yet.
     mariadb-client-core depends on mariadb-common (>= 1:10.11.11-0ubuntu0.24.04.2); however:
      Package mariadb-common is not configured yet.
    
    dpkg: error processing package mariadb-client-core (--configure):
     dependency problems - leaving unconfigured
    dpkg: dependency problems prevent configuration of mariadb-client:
     mariadb-client depends on mariadb-client-core (>= 1:10.11.11-0ubuntu0.24.04.2); however:
      Package mariadb-client-core is not configured yet.
    
    dpkg: error processing packNo apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                                                         No apport report written because MaxReports is reached already
                                                                age mariadb-client (--configure):
     dependency problems - leaving unconfigured
    Errors were encountered while processing:
     mariadb-common
     libmariadb3:amd64
     mariadb-client-core
     mariadb-client
    E: Sub-process /usr/bin/dpkg returned an error code (1)

      aaP_demo1
      My database service is mariadb 11.4.4. which i did installed long time ago but this problem just happened around this week when my server starts to getting high server loads. After restarted, it just can't install anything via command

      # sudo dpkg --configure -a
      Setting up mariadb-common (1:10.11.11-0ubuntu0.24.04.2) ...
      update-alternatives: error: alternative path /etc/mysql/mariadb.cnf doesn't exist
      dpkg: error processing package mariadb-common (--configure):
       installed mariadb-common package post-installation script subprocess returned error exit status 2
      dpkg: dependency problems prevent configuration of libmariadb3:amd64:
       libmariadb3:amd64 depends on mariadb-common; however:
        Package mariadb-common is not configured yet.
      
      dpkg: error processing package libmariadb3:amd64 (--configure):
       dependency problems - leaving unconfigured
      dpkg: dependency problems prevent configuration of mariadb-client-core:
       mariadb-client-core depends on libmariadb3 (>= 10.5.4); however:
        Package libmariadb3:amd64 is not configured yet.
       mariadb-client-core depends on mariadb-common (>= 1:10.11.11-0ubuntu0.24.04.2); however:
        Package mariadb-common is not configured yet.
      
      dpkg: error processing package mariadb-client-core (--configure):
       dependency problems - leaving unconfigured
      dpkg: dependency problems prevent configuration of mariadb-client:
       mariadb-client depends on mariadb-client-core (>= 1:10.11.11-0ubuntu0.24.04.2); however:
        Package mariadb-client-core is not configured yet.
      
      dpkg: error processing package mariadb-client (--configure):
       dependency problems - leaving unconfigured
      Errors were encountered while processing:
       mariadb-common
       libmariadb3:amd64
       mariadb-client-core
       mariadb-client
      Connect with us: 📨 Telegram 💬 Discord Email: support@aapanel.com