Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-28640

dpkg: warning: old mariadb-server-10.6 package pre-removal script subprocess returned error exit status 1

Details

    • Bug
    • Status: In Testing (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.6, 10.7(EOL)
    • 10.6
    • Server, Upgrades
    • Debian 11.3 with sysvinit

    Description

      When I try to upgrade my mariadb packages as part of a routine apt-get dist-upgrade or apt full-upgrade, it fails with the following messages:

      dpkg: mariadb-client-10.6: dependency problems, but removing anyway as you requested: 
      mariadb-server-10.6 depends on mariadb-client-10.6 (>= 1:10.6.7+maria~bullseye). 
      mariadb-client depends on mariadb-client-10.6 (>= 1:10.6.8+maria~bullseye).
       
      Removing mariadb-client-10.6 (1:10.6.7+maria~bullseye) ...
      Setting up mysql-common (1:10.6.8+maria~bullseye) ...
      Setting up mariadb-common (1:10.6.8+maria~bullseye) ...
      Preparing to unpack .../00-mariadb-server-10.6_1%3a10.6.8+maria~bullseye_amd64.deb ...
      Stopping MariaDB database server: mariadbd failed!
      invoke-rc.d: initscript mariadb, action "stop" failed.
      dpkg: warning: old mariadb-server-10.6 package pre-removal script subprocess returned error exit status 1
      dpkg: trying script from the new package instead ...
      Stopping MariaDB database server: mariadbd failed!
      invoke-rc.d: initscript mariadb, action "stop" failed.
      dpkg: error processing archive /tmp/apt-dpkg-install-tGWUd2/00-mariadb-server-10.6_1%3a10.6.8+maria~bullseye_amd64.deb (  --unpack): 
      new mariadb-server-10.6 package pre-removal script subprocess returned error exit status 1
      Starting MariaDB database server: mariadbd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . failed!
      invoke-rc.d: initscript mariadb, action "start" failed.
      dpkg: error while cleaning up: installed mariadb-server-10.6 package post-installation script subprocess returned error exit status 1
      

      This can then be fixed with apt --fix-broken install, but it's a nuisance and causes enough downtime to have to take the server out of production to upgrade.

      # apt-get -y dist-upgrade
      You might want to run 'apt --fix-broken install' to correct these.
      The following packages have unmet dependencies: 
      mariadb-client-10.6 : Breaks: mariadb-server-10.6 (< 1:10.6.8+maria~bullseye) but 1:10.6.7+maria~bullseye is installed 
      mariadb-server : Depends: mariadb-server-10.6 (>= 1:10.6.8+maria~bullseye) but 1:10.6.7+maria~bullseye is installed 
      mariadb-server-core-10.6 : Breaks: mariadb-server-10.6 (< 1:10.6.8+maria~bullseye) but 1:10.6.7+maria~bullseye is installed
      E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
      

      I am using mariadb's repository.

      deb [arch=amd64] https://ftp.osuosl.org/pub/mariadb/repo/10.6/debian bullseye main
      

      Attachments

        Issue Links

          Activity

            herrnoel Eric X added a comment - - edited

            Just went to update 10.6 to the latest and the results are still bad but with different errors:

            Removing mariadb-client-10.6 (1:10.6.12+maria~deb11) ...
            Setting up mysql-common (1:10.6.13+maria~deb11) ...
            Setting up mariadb-common (1:10.6.13+maria~deb11) ...
            (Reading database ... 56749 files and directories currently installed.)
            Preparing to unpack .../mariadb-server-10.6_1%3a10.6.13+maria~deb11_amd64.deb ...
            Command mariadb-admin/mysqladmin not found! This SysV init script depends on it. ... failed!
            invoke-rc.d: initscript mariadb, action "stop" failed.
            dpkg: warning: old mariadb-server-10.6 package pre-removal script subprocess returned error exit status 255
            dpkg: trying script from the new package instead ...
            Command mariadb-admin/mysqladmin not found! This SysV init script depends on it. ... failed!
            invoke-rc.d: initscript mariadb, action "stop" failed.
            dpkg: error processing archive /var/cache/apt/archives/mariadb-server-10.6_1%3a10.6.13+maria~deb11_amd64.deb (--unpack):
            new mariadb-server-10.6 package pre-removal script subprocess returned error exit status 255
            Command mariadb-admin/mysqladmin not found! This SysV init script depends on it. ... failed!
            invoke-rc.d: initscript mariadb, action "start" failed.
            dpkg: error while cleaning up:
             installed mariadb-server-10.6 package post-installation script subprocess returned error exit status 255
            Preparing to unpack .../mariadb-server-core-10.6_1%3a10.6.13+maria~deb11_amd64.deb ...
            Unpacking mariadb-server-core-10.6 (1:10.6.13+maria~deb11) over (1:10.6.12+maria~deb11) ...
            Preparing to unpack .../mariadb-client-core-10.6_1%3a10.6.13+maria~deb11_amd64.deb ...
            Unpacking mariadb-client-core-10.6 (1:10.6.13+maria~deb11) over (1:10.6.12+maria~deb11) ...
            Selecting previously unselected package mariadb-client-10.6.
            Preparing to unpack .../mariadb-client-10.6_1%3a10.6.13+maria~deb11_amd64.deb ...
            Unpacking mariadb-client-10.6 (1:10.6.13+maria~deb11) ...
            Errors were encountered while processing:
             /var/cache/apt/archives/mariadb-server-10.6_1%3a10.6.13+maria~deb11_amd64.deb
            E: Sub-process /usr/bin/dpkg returned an error code (1)
            

            Something is wrong with this jira platform. I had to manually type in all the line feeds just to make this readable.

            herrnoel Eric X added a comment - - edited Just went to update 10.6 to the latest and the results are still bad but with different errors: Removing mariadb-client- 10.6 ( 1 : 10.6 . 12 +maria~deb11) ... Setting up mysql-common ( 1 : 10.6 . 13 +maria~deb11) ... Setting up mariadb-common ( 1 : 10.6 . 13 +maria~deb11) ... (Reading database ... 56749 files and directories currently installed.) Preparing to unpack .../mariadb-server- 10 .6_1%3a10. 6.13 +maria~deb11_amd64.deb ... Command mariadb-admin/mysqladmin not found! This SysV init script depends on it. ... failed! invoke-rc.d: initscript mariadb, action "stop" failed. dpkg: warning: old mariadb-server- 10.6 package pre-removal script subprocess returned error exit status 255 dpkg: trying script from the new package instead ... Command mariadb-admin/mysqladmin not found! This SysV init script depends on it. ... failed! invoke-rc.d: initscript mariadb, action "stop" failed. dpkg: error processing archive /var/cache/apt/archives/mariadb-server- 10 .6_1%3a10. 6.13 +maria~deb11_amd64.deb (--unpack): new mariadb-server- 10.6 package pre-removal script subprocess returned error exit status 255 Command mariadb-admin/mysqladmin not found! This SysV init script depends on it. ... failed! invoke-rc.d: initscript mariadb, action "start" failed. dpkg: error while cleaning up:  installed mariadb-server- 10.6 package post-installation script subprocess returned error exit status 255 Preparing to unpack .../mariadb-server-core- 10 .6_1%3a10. 6.13 +maria~deb11_amd64.deb ... Unpacking mariadb-server-core- 10.6 ( 1 : 10.6 . 13 +maria~deb11) over ( 1 : 10.6 . 12 +maria~deb11) ... Preparing to unpack .../mariadb-client-core- 10 .6_1%3a10. 6.13 +maria~deb11_amd64.deb ... Unpacking mariadb-client-core- 10.6 ( 1 : 10.6 . 13 +maria~deb11) over ( 1 : 10.6 . 12 +maria~deb11) ... Selecting previously unselected package mariadb-client- 10.6 . Preparing to unpack .../mariadb-client- 10 .6_1%3a10. 6.13 +maria~deb11_amd64.deb ... Unpacking mariadb-client- 10.6 ( 1 : 10.6 . 13 +maria~deb11) ... Errors were encountered while processing:  /var/cache/apt/archives/mariadb-server- 10 .6_1%3a10. 6.13 +maria~deb11_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code ( 1 ) Something is wrong with this jira platform. I had to manually type in all the line feeds just to make this readable.

            Related downstream Debian bug report with further discussion: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1035949

            otto Otto Kekäläinen added a comment - Related downstream Debian bug report with further discussion: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1035949
            herrnoel Eric X added a comment -

            seems resolved now but the init.d script has a small bug on line 98

              if [ ! -d "$datadir"]

            change to

              if [ ! -d "$datadir" ]

            and the bash error goes away

            herrnoel Eric X added a comment - seems resolved now but the init.d script has a small bug on line 98   if [ ! -d "$datadir"] change to   if [ ! -d "$datadir" ] and the bash error goes away
            otto Otto Kekäläinen added a comment - - edited

            For the record, the `"$datadir"]` bug above mentioned by herrnoel was introduced by illuusio in https://github.com/MariaDB/server/commit/8171f9da87c9e062b056834942634f04f39d5aea and has still not been fixed in MariaDB, but the Debian equivalent https://github.com/ottok/mariadb/commit/35d532ee2a3b1a55c1b085f750ac980429b1d375 never had it and thus downstream Debian does not need any fixing in this regard.

            otto Otto Kekäläinen added a comment - - edited For the record, the `"$datadir"]` bug above mentioned by herrnoel was introduced by illuusio in https://github.com/MariaDB/server/commit/8171f9da87c9e062b056834942634f04f39d5aea and has still not been fixed in MariaDB, but the Debian equivalent https://github.com/ottok/mariadb/commit/35d532ee2a3b1a55c1b085f750ac980429b1d375 never had it and thus downstream Debian does not need any fixing in this regard.
            illuusio Tuukka Pasanen added a comment - - edited Yes my bad and fixed also in upstream: https://github.com/MariaDB/server/commit/12d05c8266567ea9a62ccabc3180a90129bf81e0

            People

              otto Otto Kekäläinen
              herrnoel Eric X
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.