package mariadb-server-5.5 install returned error exit status 1 due bug in mysql flags removal

Bug #1417917 reported by Kunal Chowdhury
30
This bug affects 4 people
Affects Status Importance Assigned to Milestone
mariadb-5.5 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

$ lsb_release -rd
Description: Ubuntu 14.04 LTS
Release: 14.04

$ sudo apt-cache policy mariadb-server-5.5
mariadb-server-5.5:
  Installed: 5.5.41-0ubuntu0.14.04.2
  Candidate: 5.5.41-0ubuntu0.14.04.2
  Version table:
 *** 5.5.41-0ubuntu0.14.04.2 0
        500 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/universe amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/universe amd64 Packages
        100 /var/lib/dpkg/status
     5.5.36-1 0
        500 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages

Tried installing via:

$ sudo apt-get install mariadb-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl libmariadbclient18 libmysqlclient18 libreadline5 libterm-readkey-perl mariadb-client-5.5 mariadb-client-core-5.5 mariadb-common
  mariadb-server-5.5 mariadb-server-core-5.5 mysql-common
Suggested packages:
  libclone-perl libmldbm-perl libnet-daemon-perl libplrpc-perl libsql-statement-perl libipc-sharedcache-perl mailx mariadb-test tinyca
The following NEW packages will be installed:
  libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl libmariadbclient18 libmysqlclient18 libreadline5 libterm-readkey-perl mariadb-client-5.5 mariadb-client-core-5.5 mariadb-common
  mariadb-server mariadb-server-5.5 mariadb-server-core-5.5 mysql-common
0 upgraded, 15 newly installed, 0 to remove and 121 not upgraded.
Need to get 11.4 MB of archives.
After this operation, 118 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu/ trusty/main libaio1 amd64 0.3.109-4 [6364 B]
Get:2 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-common all 5.5.41-0ubuntu0.14.04.1 [14.1 kB]
Get:3 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/universe mariadb-common all 5.5.41-0ubuntu0.14.04.2 [13.7 kB]
Get:4 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/universe libmariadbclient18 amd64 5.5.41-0ubuntu0.14.04.2 [531 kB]
Get:5 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main libmysqlclient18 amd64 5.5.41-0ubuntu0.14.04.1 [595 kB]
Get:6 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu/ trusty/main libreadline5 amd64 5.2+dfsg-2 [130 kB]
Get:7 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu/ trusty/main libdbi-perl amd64 1.630-1 [879 kB]
Get:8 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu/ trusty/main libterm-readkey-perl amd64 2.31-1 [27.4 kB]
Get:9 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/universe mariadb-client-core-5.5 amd64 5.5.41-0ubuntu0.14.04.2 [633 kB]
Get:10 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/universe mariadb-client-5.5 amd64 5.5.41-0ubuntu0.14.04.2 [974 kB]
Get:11 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/universe mariadb-server-core-5.5 amd64 5.5.41-0ubuntu0.14.04.2 [3834 kB]
Get:12 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/universe mariadb-server-5.5 amd64 5.5.41-0ubuntu0.14.04.2 [3634 kB]
Get:13 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu/ trusty/main libdbd-mysql-perl amd64 4.025-1 [99.3 kB]
Get:14 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu/ trusty/main libhtml-template-perl all 2.95-1 [65.5 kB]
Get:15 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/universe mariadb-server all 5.5.41-0ubuntu0.14.04.2 [11.7 kB]
Fetched 11.4 MB in 16s (679 kB/s)
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
 LANGUAGE = (unset),
 LC_ALL = (unset),
 LC_CTYPE = "UTF-8",
 LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Preconfiguring packages ...
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
Selecting previously unselected package libaio1:amd64.
(Reading database ... 51065 files and directories currently installed.)
Preparing to unpack .../libaio1_0.3.109-4_amd64.deb ...
Unpacking libaio1:amd64 (0.3.109-4) ...
Selecting previously unselected package mysql-common.
Preparing to unpack .../mysql-common_5.5.41-0ubuntu0.14.04.1_all.deb ...
Unpacking mysql-common (5.5.41-0ubuntu0.14.04.1) ...
Selecting previously unselected package mariadb-common.
Preparing to unpack .../mariadb-common_5.5.41-0ubuntu0.14.04.2_all.deb ...
Unpacking mariadb-common (5.5.41-0ubuntu0.14.04.2) ...
Selecting previously unselected package libmariadbclient18:amd64.
Preparing to unpack .../libmariadbclient18_5.5.41-0ubuntu0.14.04.2_amd64.deb ...
Unpacking libmariadbclient18:amd64 (5.5.41-0ubuntu0.14.04.2) ...
Selecting previously unselected package libmysqlclient18:amd64.
Preparing to unpack .../libmysqlclient18_5.5.41-0ubuntu0.14.04.1_amd64.deb ...
Unpacking libmysqlclient18:amd64 (5.5.41-0ubuntu0.14.04.1) ...
Selecting previously unselected package libreadline5:amd64.
Preparing to unpack .../libreadline5_5.2+dfsg-2_amd64.deb ...
Unpacking libreadline5:amd64 (5.2+dfsg-2) ...
Selecting previously unselected package libdbi-perl.
Preparing to unpack .../libdbi-perl_1.630-1_amd64.deb ...
Unpacking libdbi-perl (1.630-1) ...
Selecting previously unselected package libterm-readkey-perl.
Preparing to unpack .../libterm-readkey-perl_2.31-1_amd64.deb ...
Unpacking libterm-readkey-perl (2.31-1) ...
Selecting previously unselected package mariadb-client-core-5.5.
Preparing to unpack .../mariadb-client-core-5.5_5.5.41-0ubuntu0.14.04.2_amd64.deb ...
Unpacking mariadb-client-core-5.5 (5.5.41-0ubuntu0.14.04.2) ...
Selecting previously unselected package mariadb-client-5.5.
Preparing to unpack .../mariadb-client-5.5_5.5.41-0ubuntu0.14.04.2_amd64.deb ...
Unpacking mariadb-client-5.5 (5.5.41-0ubuntu0.14.04.2) ...
Selecting previously unselected package mariadb-server-core-5.5.
Preparing to unpack .../mariadb-server-core-5.5_5.5.41-0ubuntu0.14.04.2_amd64.deb ...
Unpacking mariadb-server-core-5.5 (5.5.41-0ubuntu0.14.04.2) ...
Processing triggers for man-db (2.6.7.1-1) ...
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Setting up mysql-common (5.5.41-0ubuntu0.14.04.1) ...
Setting up mariadb-common (5.5.41-0ubuntu0.14.04.2) ...
Selecting previously unselected package mariadb-server-5.5.
(Reading database ... 51407 files and directories currently installed.)
Preparing to unpack .../mariadb-server-5.5_5.5.41-0ubuntu0.14.04.2_amd64.deb ...
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Unpacking mariadb-server-5.5 (5.5.41-0ubuntu0.14.04.2) ...
Selecting previously unselected package libdbd-mysql-perl.
Preparing to unpack .../libdbd-mysql-perl_4.025-1_amd64.deb ...
Unpacking libdbd-mysql-perl (4.025-1) ...
Selecting previously unselected package libhtml-template-perl.
Preparing to unpack .../libhtml-template-perl_2.95-1_all.deb ...
Unpacking libhtml-template-perl (2.95-1) ...
Selecting previously unselected package mariadb-server.
Preparing to unpack .../mariadb-server_5.5.41-0ubuntu0.14.04.2_all.deb ...
Unpacking mariadb-server (5.5.41-0ubuntu0.14.04.2) ...
Processing triggers for man-db (2.6.7.1-1) ...
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Processing triggers for ureadahead (0.100.0-16) ...
Setting up libaio1:amd64 (0.3.109-4) ...
Setting up libmariadbclient18:amd64 (5.5.41-0ubuntu0.14.04.2) ...
Setting up libmysqlclient18:amd64 (5.5.41-0ubuntu0.14.04.1) ...
Setting up libreadline5:amd64 (5.2+dfsg-2) ...
Setting up libdbi-perl (1.630-1) ...
Setting up libterm-readkey-perl (2.31-1) ...
Setting up mariadb-client-core-5.5 (5.5.41-0ubuntu0.14.04.2) ...
Setting up mariadb-client-5.5 (5.5.41-0ubuntu0.14.04.2) ...
Setting up mariadb-server-core-5.5 (5.5.41-0ubuntu0.14.04.2) ...
Setting up mariadb-server-5.5 (5.5.41-0ubuntu0.14.04.2) ...
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
 * Stopping MariaDB database server mysqld [ OK ]
chown: cannot access '/var/run/mysqld': No such file or directory
rm: cannot remove '/var/lib/mysql/debian-*.flag': No such file or directory
dpkg: error processing package mariadb-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up libdbd-mysql-perl (4.025-1) ...
Setting up libhtml-template-perl (2.95-1) ...
dpkg: dependency problems prevent configuration of mariadb-server:
 mariadb-server depends on mariadb-server-5.5 (>= 5.5.41-0ubuntu0.14.04.2); however:
  Package mariadb-server-5.5 is not configured yet.

dpkg: error processing package mariadb-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Processing triggers for libc-bin (2.19-0ubuntu6) ...
Processing triggers for ureadahead (0.100.0-16) ...
Errors were encountered while processing:
 mariadb-server-5.5
 mariadb-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Configuration fails due to missing /var/run/mysqld

Tried running configure again via:

$ sudo dpkg --configure -a
Setting up mariadb-server-5.5 (5.5.41-0ubuntu0.14.04.2) ...
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
 * Stopping MariaDB database server mysqld [ OK ]
chown: cannot access '/var/run/mysqld': No such file or directory
rm: cannot remove '/var/lib/mysql/debian-*.flag': No such file or directory
dpkg: error processing package mariadb-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mariadb-server:
 mariadb-server depends on mariadb-server-5.5 (>= 5.5.41-0ubuntu0.14.04.2); however:
  Package mariadb-server-5.5 is not configured yet.

dpkg: error processing package mariadb-server (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mariadb-server-5.5
 mariadb-server

Revision history for this message
Otto Kekäläinen (otto) wrote :
Changed in mariadb-5.5 (Ubuntu):
status: New → Confirmed
Revision history for this message
Otto Kekäläinen (otto) wrote :

You can fix this manually temporary by running:

sudo touch /var/lib/mysql/debian-5.5.flag

summary: - package mariadb-server-5.5 install returned error exit status 1 due to
- missing /var/run/mysqld
+ package mariadb-server-5.5 install returned error exit status 1 due bug
+ in mysql flags removal
Revision history for this message
Otto Kekäläinen (otto) wrote :
Revision history for this message
Seth Arnold (seth-arnold) wrote :

Otto, thanks for the fix; new packages are building now.

Revision history for this message
Otto Kekäläinen (otto) wrote :

Good.

I just wish that I had integrated piuparts testing into my build scripts (http://labs.seravo.fi/~otto/mariadb-repo/build.sh), as I already have chroots for each distro version. But so far setting up piuparts has been too difficult. If I had piuparts automation somewhere, errors like this would not slip in.

Does Ubuntu have some piuparts facility somewhere that can be integrated with PPA so new builds would be automatically tested for install/upgrade/remove?

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mariadb-5.5 - 5.5.41-1ubuntu0.14.04.1

---------------
mariadb-5.5 (5.5.41-1ubuntu0.14.04.1) trusty-security; urgency=medium

  * Critical backport from 10.0 (commit 439123d):
    Fix mariadb-server-5.5.postinst so that the flag removal will not emit
    an error code if there are no previous debian-*.flag files (LP: #1417917)
 -- Otto Kekaelaeinen <email address hidden> Wed, 04 Feb 2015 11:28:16 +0200

Changed in mariadb-5.5 (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
burn (rob-baxter) wrote :

Still broken?

Revision history for this message
burn (rob-baxter) wrote :

The updated binaries still haven't been committed. It's been quite awhile now. What's the holdup?

Revision history for this message
Seth Arnold (seth-arnold) wrote :

Burn, perhaps you should open a new bug report if you're seeing issues; 5.5.41-1ubuntu0.14.10.1 and 5.5.41-1ubuntu0.14.04.1 were published two months ago, see this for details: https://launchpad.net/ubuntu/+source/mariadb-5.5

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.