Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #256206 > unrolled thread

MariaDB Server is not installing on Debian 12

Started byTimothy M Butterworth <timothy.m.butterworth@gmail.com>
First post2023-03-20 04:00 +0100
Last post2023-04-21 21:20 +0200
Articles 5 — 4 participants

Back to article view | Back to linux.debian.user


Contents

  MariaDB Server is not installing on Debian 12 Timothy M Butterworth <timothy.m.butterworth@gmail.com> - 2023-03-20 04:00 +0100
    Re: MariaDB Server is not installing on Debian 12 Dan Ritter <dsr@randomstring.org> - 2023-03-20 11:50 +0100
      Fwd: MariaDB Server is not installing on Debian 12 Timothy M Butterworth <timothy.m.butterworth@gmail.com> - 2023-03-20 16:00 +0100
      Re: MariaDB Server is not installing on Debian 12 Cosmin Humeniuc <cosmin@hume.ro> - 2023-04-21 20:40 +0200
        Re: MariaDB Server is not installing on Debian 12 The Wanderer <wanderer@fastmail.fm> - 2023-04-21 21:20 +0200

#256206 — MariaDB Server is not installing on Debian 12

FromTimothy M Butterworth <timothy.m.butterworth@gmail.com>
Date2023-03-20 04:00 +0100
SubjectMariaDB Server is not installing on Debian 12
Message-ID<GbdUB-dHdF-3@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

I am unable to install MariaDB on debian 12. apt show says the
mariadb-server is Version: 1:10.11.2-1.

apt upgrade
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
default-mysql-server : Depends: mariadb-server but it is not installed
mariadb-plugin-provider-bzip2 : Depends: mariadb-server (>= 1:10.11.1-1)
but it is not installed
mariadb-plugin-provider-lz4 : Depends: mariadb-server (>= 1:10.11.1-1) but
it is not installed
mariadb-plugin-provider-lzma : Depends: mariadb-server (>= 1:10.11.1-1) but
it is not installed
mariadb-plugin-provider-lzo : Depends: mariadb-server (>= 1:10.11.1-1) but
it is not installed
mariadb-plugin-provider-snappy : Depends: mariadb-server (>= 1:10.11.1-1)
but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or
specify a solution).

apt install mariadb-server
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
 mailx mariadb-test netcat-openbsd
The following NEW packages will be installed:
 mariadb-server
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
120 not fully installed or removed.
Need to get 0 B/3,581 kB of archives.
After this operation, 54.5 MB of additional disk space will be used.
Preconfiguring packages ...
(Reading database ... 327299 files and directories currently installed.)
Preparing to unpack .../mariadb-server_1%3a10.11.2-1_amd64.deb ...
Failed to stop mariadb.service: Unit mariadb.service not loaded.
invoke-rc.d: initscript mariadb, action "stop" failed.
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
Attempt to stop MariaDB/MySQL server returned exitcode 5
There is a MariaDB/MySQL server running, but we failed in our attempts to
stop it.
Stop it yourself and try again!
dpkg: error processing archive
/var/cache/apt/archives/mariadb-server_1%3a10.11.2-1_amd64.deb (--unpack):
new mariadb-server package pre-installation script subprocess returned
error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/mariadb-server_1%3a10.11.2-1_amd64.deb


-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
⠈⠳⣄⠀⠀

[toc] | [next] | [standalone]


#256216

FromDan Ritter <dsr@randomstring.org>
Date2023-03-20 11:50 +0100
Message-ID<Gblfr-dM6G-7@gated-at.bofh.it>
In reply to#256206
Timothy M Butterworth wrote: 
> I am unable to install MariaDB on debian 12. apt show says the
> mariadb-server is Version: 1:10.11.2-1.
> 
> Failed to stop mariadb.service: Unit mariadb.service not loaded.
> invoke-rc.d: initscript mariadb, action "stop" failed.
> Failed to stop mysql.service: Unit mysql.service not loaded.
> invoke-rc.d: initscript mysql, action "stop" failed.
> Attempt to stop MariaDB/MySQL server returned exitcode 5
> There is a MariaDB/MySQL server running, but we failed in our attempts to
> stop it.
> Stop it yourself and try again!

Have you done that?

> new mariadb-server package pre-installation script subprocess returned
> error exit status 1

If there is no mariadb or mysql server running, but the system
believes that there is, /var/lib/dpkg/info should contain a
mariadb.preinst script which can be examined for what mechanism
it is using to determine that.

-dsr-

[toc] | [prev] | [next] | [standalone]


#256224

FromTimothy M Butterworth <timothy.m.butterworth@gmail.com>
Date2023-03-20 16:00 +0100
Message-ID<Gbp9o-dOxH-9@gated-at.bofh.it>
In reply to#256216

[Multipart message — attachments visible in raw view] — view raw

On Mon, Mar 20, 2023 at 7:49 AM Dan Ritter <dsr@randomstring.org> wrote:

> Timothy M Butterworth wrote:
> > On Mon, Mar 20, 2023 at 6:25 AM Dan Ritter <dsr@randomstring.org> wrote:
> >
> > > Timothy M Butterworth wrote:
> > > > I am unable to install MariaDB on debian 12. apt show says the
> > > > mariadb-server is Version: 1:10.11.2-1.
> > > >
> > > > Failed to stop mariadb.service: Unit mariadb.service not loaded.
> > > > invoke-rc.d: initscript mariadb, action "stop" failed.
> > > > Failed to stop mysql.service: Unit mysql.service not loaded.
> > > > invoke-rc.d: initscript mysql, action "stop" failed.
> > > > Attempt to stop MariaDB/MySQL server returned exitcode 5
> > > > There is a MariaDB/MySQL server running, but we failed in our
> attempts to
> > > > stop it.
> > > > Stop it yourself and try again!
> > >
> > > Have you done that?
> > >
> >
> > I do not have any instances of MySQL or MariaDB running. The unit files
> are
> > not even installed.
>
> The pre-inst script believes that you do.
>
> > > > new mariadb-server package pre-installation script subprocess
> returned
> > > > error exit status 1
> > >
> > > If there is no mariadb or mysql server running, but the system
> > > believes that there is, /var/lib/dpkg/info should contain a
> > > mariadb.preinst script which can be examined for what mechanism
> > > it is using to determine that.
>
>
> ^ That. Go read it, execute it by hand, see what it is mistaken
> about.
>
> -dsr-
>

Dan,

Thanks for the info. I got it to install. I copied the mariadb.service file
and made a soft link from it to mysql.service. I was able to successfully
run `systemctl stop` against both service files. There was nothing to stop
since there was no database installed but I tricked the script into
thinking that it stopped the database. Anyway it was a little hacky but I
got mariadb-server installed.

Tim

-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
⠈⠳⣄⠀⠀

[toc] | [prev] | [next] | [standalone]


#257469

FromCosmin Humeniuc <cosmin@hume.ro>
Date2023-04-21 20:40 +0200
Message-ID<Gn3PP-3zcZ-5@gated-at.bofh.it>
In reply to#256216
I have the same problem of not being able to install mariadb-server 
1:10.11.2-1. The error is the same - a failed attempt to stop 
mariadb.service or mysql.service.

In my case, there is no service running for either of them, so I have 
nothing to stop. I also checked, and there's no mariadb.preinst file in 
/var/lib/dpkg/info.

However, I started from these lines in the output:
 > Errors were encountered while processing:
 >  /var/cache/apt/archives/mariadb-server_1%3a10.11.2-1_amd64.deb

and I used dpkg-deb to look in that package file. DEBIAN/preinst had a 
`stop_server()` function that was trying to stop existing servers based 
on the result of:
 > pgrep -x --nslist pid --ns $$ "mysqld|mariadbd"

(at line 31). I executed that in a shell and I did get a result - only 
it wasn't for a running server, but for a standalone process:
 > pgrep -x --nslist pid --ns $$ "mysqld|mariadbd"
 > 1939

 > ps aux | grep 1939
 > cosmin      1939  0.0  1.2 2439604 204892 ?      Sl   19:22   0:02 
/usr/sbin/mysqld 
--defaults-file=/home/cosmin/.local/share/akonadi/mysql.conf 
--datadir=/home/cosmin/.local/share/akonadi/db_data/ 
--socket=/run/user/1000/akonadi/mysql.socket 
--pid-file=/run/user/1000/akonadi/mysql.pid

My guess is that the check from `preinst` could be improved to handle 
cases like this. Does it count like a bug? Should I file a report?

-- 
Cosmin

[toc] | [prev] | [next] | [standalone]


#257470

FromThe Wanderer <wanderer@fastmail.fm>
Date2023-04-21 21:20 +0200
Message-ID<Gn4sx-3zHL-1@gated-at.bofh.it>
In reply to#257469

[Multipart message — attachments visible in raw view] — view raw

On 2023-04-21 at 14:11, Cosmin Humeniuc wrote:

> I have the same problem of not being able to install mariadb-server 
> 1:10.11.2-1. The error is the same - a failed attempt to stop 
> mariadb.service or mysql.service.
> 
> In my case, there is no service running for either of them, so I have 
> nothing to stop. I also checked, and there's no mariadb.preinst file in 
> /var/lib/dpkg/info.
> 
> However, I started from these lines in the output:
>  > Errors were encountered while processing:
>  >  /var/cache/apt/archives/mariadb-server_1%3a10.11.2-1_amd64.deb
> 
> and I used dpkg-deb to look in that package file. DEBIAN/preinst had a 
> `stop_server()` function that was trying to stop existing servers based 
> on the result of:
>  > pgrep -x --nslist pid --ns $$ "mysqld|mariadbd"
> 
> (at line 31). I executed that in a shell and I did get a result - only 
> it wasn't for a running server, but for a standalone process:
>  > pgrep -x --nslist pid --ns $$ "mysqld|mariadbd"
>  > 1939
> 
>  > ps aux | grep 1939
>  > cosmin      1939  0.0  1.2 2439604 204892 ?      Sl   19:22   0:02 
> /usr/sbin/mysqld 
> --defaults-file=/home/cosmin/.local/share/akonadi/mysql.conf 
> --datadir=/home/cosmin/.local/share/akonadi/db_data/ 
> --socket=/run/user/1000/akonadi/mysql.socket 
> --pid-file=/run/user/1000/akonadi/mysql.pid

How is that not a server? /usr/sbin/mysqld is the server binary; that
looks like an instance of the server, run by (what I'm presuming is) an
ordinary user rather than by e.g. the 'mysql' account that is used to
run the 'system-wide' instance(s?) of that server.

I could just be blind or ignorant, but I can't see any reason offhand
why that process wouldn't be expected to need to be stopped in just the
same way as those running under other user IDs.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web