New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors while installing on Debian 8 #69

Closed
hrstoyanov opened this Issue Nov 7, 2015 · 13 comments

Comments

Projects
None yet
4 participants
@hrstoyanov

hrstoyanov commented Nov 7, 2015

failed: [localhost] => (item=mysql-common,mysql-server) => {"failed": true, "item": "mysql-common,mysql-server"}
stderr: E: Sub-process /usr/bin/dpkg returned an error code (1)

stdout: Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl
  libterm-readkey-perl mysql-client-5.5 mysql-server-5.5 mysql-server-core-5.5
Suggested packages:
  libclone-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl
  libipc-sharedcache-perl tinyca
The following NEW packages will be installed:
  libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl
  libterm-readkey-perl mysql-client-5.5 mysql-server mysql-server-5.5
  mysql-server-core-5.5
0 upgraded, 9 newly installed, 0 to remove and 0 not upgraded.
Need to get 7912 kB of archives.
After this operation, 92.2 MB of additional disk space will be used.
Get:1 http://security.debian.org/ jessie/updates/main mysql-client-5.5 amd64 5.5.46-0+deb8u1 [1662 kB]
Get:2 http://httpredir.debian.org/debian/ jessie/main libaio1 amd64 0.3.110-1 [9312 B]
Get:3 http://httpredir.debian.org/debian/ jessie/main libdbi-perl amd64 1.631-3+b1 [816 kB]
Get:4 http://httpredir.debian.org/debian/ jessie/main libdbd-mysql-perl amd64 4.028-2+b1 [119 kB]
Get:5 http://httpredir.debian.org/debian/ jessie/main libterm-readkey-perl amd64 2.32-1+b1 [28.0 kB]
Get:6 http://security.debian.org/ jessie/updates/main mysql-server-core-5.5 amd64 5.5.46-0+deb8u1 [3351 kB]
Get:7 http://httpredir.debian.org/debian/ jessie/main libhtml-template-perl all 2.95-1 [66.8 kB]
Get:8 http://security.debian.org/ jessie/updates/main mysql-server-5.5 amd64 5.5.46-0+deb8u1 [1776 kB]
Get:9 http://security.debian.org/ jessie/updates/main mysql-server all 5.5.46-0+deb8u1 [83.7 kB]
Preconfiguring packages ...
Fetched 7912 kB in 5s (1412 kB/s)
Selecting previously unselected package libaio1:amd64.
(Reading database ... 16045 files and directories currently installed.)
Preparing to unpack .../libaio1_0.3.110-1_amd64.deb ...
Unpacking libaio1:amd64 (0.3.110-1) ...
Selecting previously unselected package libdbi-perl.
Preparing to unpack .../libdbi-perl_1.631-3+b1_amd64.deb ...
Unpacking libdbi-perl (1.631-3+b1) ...
Selecting previously unselected package libdbd-mysql-perl.
Preparing to unpack .../libdbd-mysql-perl_4.028-2+b1_amd64.deb ...
Unpacking libdbd-mysql-perl (4.028-2+b1) ...
Selecting previously unselected package libterm-readkey-perl.
Preparing to unpack .../libterm-readkey-perl_2.32-1+b1_amd64.deb ...
Unpacking libterm-readkey-perl (2.32-1+b1) ...
Selecting previously unselected package mysql-client-5.5.
Preparing to unpack .../mysql-client-5.5_5.5.46-0+deb8u1_amd64.deb ...
Unpacking mysql-client-5.5 (5.5.46-0+deb8u1) ...
Selecting previously unselected package mysql-server-core-5.5.
Preparing to unpack .../mysql-server-core-5.5_5.5.46-0+deb8u1_amd64.deb ...
Unpacking mysql-server-core-5.5 (5.5.46-0+deb8u1) ...
Selecting previously unselected package mysql-server-5.5.
Preparing to unpack .../mysql-server-5.5_5.5.46-0+deb8u1_amd64.deb ...
Aborting downgrade from (at least) 10.0 to 5.5.
If are sure you want to downgrade to 5.5, remove the file
/var/lib/mysql/debian-*.flag and try installing again.
dpkg: error processing archive /var/cache/apt/archives/mysql-server-5.5_5.5.46-0+deb8u1_amd64.deb (--unpack):
 subprocess new pre-installation script returned error exit status 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 mysql-server.
Preparing to unpack .../mysql-server_5.5.46-0+deb8u1_all.deb ...
Unpacking mysql-server (5.5.46-0+deb8u1) ...
Errors were encountered while processing:
 /var/cache/apt/archives/mysql-server-5.5_5.5.46-0+deb8u1_amd64.deb

msg: '/usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold"   install 'mysql-server'' failed: E: Sub-process /usr/bin/dpkg returned an error code (1)


FATAL: all hosts have already failed -- aborting

@hrstoyanov

This comment has been minimized.

Show comment
Hide comment
@hrstoyanov

hrstoyanov Nov 7, 2015

I suspect this has nothing to do with this Ansible role, more likely someone screwed the MySQL package at Debian...

hrstoyanov commented Nov 7, 2015

I suspect this has nothing to do with this Ansible role, more likely someone screwed the MySQL package at Debian...

@hrstoyanov

This comment has been minimized.

Show comment
Hide comment
@hrstoyanov

hrstoyanov Nov 7, 2015

Switching to MariaDB is my current workaround ...

hrstoyanov commented Nov 7, 2015

Switching to MariaDB is my current workaround ...

@geerlingguy geerlingguy added the question label Nov 9, 2015

@geerlingguy

This comment has been minimized.

Show comment
Hide comment
@geerlingguy

geerlingguy Nov 9, 2015

Owner

Yeah, definitely looks like a package issue with apt :(

I'll leave this open in case anyone else has any ideas or sees a different solution besides temporarily (or permanently!) switching to MariaDB on any systems getting this error.

Owner

geerlingguy commented Nov 9, 2015

Yeah, definitely looks like a package issue with apt :(

I'll leave this open in case anyone else has any ideas or sees a different solution besides temporarily (or permanently!) switching to MariaDB on any systems getting this error.

@mightydok

This comment has been minimized.

Show comment
Hide comment
@mightydok

mightydok Nov 9, 2015

@hrstoyanov can you share your playbook, vars, roles and all other files. I can try to solve this problem.

mightydok commented Nov 9, 2015

@hrstoyanov can you share your playbook, vars, roles and all other files. I can try to solve this problem.

@hrstoyanov

This comment has been minimized.

Show comment
Hide comment
@hrstoyanov

hrstoyanov Nov 9, 2015

@mightydok @geerlingguy Here is how to reproduce it with Docker container:

a. Create a docker image "test" based on this Dockerfile:
docker build -q -t test .

# Configure a minimal Debian image with: systemd, sshd and cron. Also, some basic utils are added. Locale is configured to make PostgresSQL installation happy.
FROM debian:latest
ENV container docker
#ENV LANG   en_US.UTF-8
#ENV LANGUAGE   en_US.UTF-8
ENV LANG   C
ENV LANGUAGE   C
ENV LC_ALL C
ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update \
    && apt-get --yes install dnsutils traceroute apt-utils sudo python cron zip unzip git nano wget curl \
    && apt-get --purge  remove openssh-server \
    && apt-get --yes install systemd \
    && cd  /lib/systemd/system/sysinit.target.wants \
    && ls | grep -v systemd-tmpfiles-setup | xargs rm -f $1  \
    && rm -f /lib/systemd/system/multi-user.target.wants/* \
    && rm -f /etc/systemd/system/*.wants/* \
    && rm -f /lib/systemd/system/local-fs.target.wants/*  \
    && rm -f /lib/systemd/system/sockets.target.wants/*udev*  \
    && rm -f /lib/systemd/system/sockets.target.wants/*initctl* \
    && rm -f /lib/systemd/system/basic.target.wants/* \
    && rm -f /lib/systemd/system/anaconda.target.wants/* \
    && rm -f /lib/systemd/system/plymouth* \
    && rm -f /lib/systemd/system/systemd-update-utmp* \
    && apt-get --yes install openssh-server \
    && systemctl set-default multi-user.target \
    && systemctl enable ssh \
    && systemctl enable cron \
    && apt-get --yes install locales \
#    && dpkg-reconfigure locales \
#    && locale-gen en_US \
#    && locale-gen en_US.UTF-8 \
    && apt-get autoremove

#Allows root login with SSH, change shell, generate locales
RUN mkdir /var/run/sshd \
    && echo 'root:root' | chpasswd \
    && sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config    \
    && chsh -s /bin/bash \
#    && echo "export LANGUAGE=en_US.UTF-8" >>/etc/bash.bashrc \
#    && echo "export LANG=en_US.UTF-8" >>/etc/bash.bashrc  \
#    && echo "export LC_ALL=C" >>/etc/bash.bashrc  \
    && echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
    && echo "export LANGUAGE=C" >>/etc/bash.bashrc \
    && echo "export LANG=C" >>/etc/bash.bashrc  \
    && echo "export LC_ALL=C" >>/etc/bash.bashrc  \
    && /usr/sbin/locale-gen

EXPOSE 22 3306 5432 80 443 8080 9990
ENV init /lib/systemd/systemd
VOLUME [ "/sys/fs/cgroup" ]
ENTRYPOINT ["/lib/systemd/systemd"]
CMD ["systemd.unit=emergency.service"]

b. Create container devbox.


docker create -it -p 2200:22 -p 3306:3306 -p 5432:5432 -p 80:80 -p 443:443 \
    --privileged=true \
    --workdir="/projects" \
    --volume /dev/shm:/dev/shm \
    --volume $SSH_AUTH_SOCK:/ssh-agent \
    --volume /tmp/.X11-unix:/tmp/.X11-unix:ro \
    --env DISPLAY=$DISPLAY \
    --env SSH_AUTH_SOCK=/ssh-agent \
    --device /dev/snd \
    --name devbox test  /bin/bash

c. Start the container

docker start devbox

and make sure you can SSH to it as root/root:

ssh root@localhost -p 2200 ls /

d. Run playbook that takes the default mysql_packages and see it fail, like:
ansible-playbook -e ansible_ssh_port=2200 mysql.yml

- hosts: localhost
  become: yes
  roles:
     -  geerlingguy.mysql

e. After the test, you can clean up with: docker rm -f devbox; docker rmi test.

hrstoyanov commented Nov 9, 2015

@mightydok @geerlingguy Here is how to reproduce it with Docker container:

a. Create a docker image "test" based on this Dockerfile:
docker build -q -t test .

# Configure a minimal Debian image with: systemd, sshd and cron. Also, some basic utils are added. Locale is configured to make PostgresSQL installation happy.
FROM debian:latest
ENV container docker
#ENV LANG   en_US.UTF-8
#ENV LANGUAGE   en_US.UTF-8
ENV LANG   C
ENV LANGUAGE   C
ENV LC_ALL C
ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update \
    && apt-get --yes install dnsutils traceroute apt-utils sudo python cron zip unzip git nano wget curl \
    && apt-get --purge  remove openssh-server \
    && apt-get --yes install systemd \
    && cd  /lib/systemd/system/sysinit.target.wants \
    && ls | grep -v systemd-tmpfiles-setup | xargs rm -f $1  \
    && rm -f /lib/systemd/system/multi-user.target.wants/* \
    && rm -f /etc/systemd/system/*.wants/* \
    && rm -f /lib/systemd/system/local-fs.target.wants/*  \
    && rm -f /lib/systemd/system/sockets.target.wants/*udev*  \
    && rm -f /lib/systemd/system/sockets.target.wants/*initctl* \
    && rm -f /lib/systemd/system/basic.target.wants/* \
    && rm -f /lib/systemd/system/anaconda.target.wants/* \
    && rm -f /lib/systemd/system/plymouth* \
    && rm -f /lib/systemd/system/systemd-update-utmp* \
    && apt-get --yes install openssh-server \
    && systemctl set-default multi-user.target \
    && systemctl enable ssh \
    && systemctl enable cron \
    && apt-get --yes install locales \
#    && dpkg-reconfigure locales \
#    && locale-gen en_US \
#    && locale-gen en_US.UTF-8 \
    && apt-get autoremove

#Allows root login with SSH, change shell, generate locales
RUN mkdir /var/run/sshd \
    && echo 'root:root' | chpasswd \
    && sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config    \
    && chsh -s /bin/bash \
#    && echo "export LANGUAGE=en_US.UTF-8" >>/etc/bash.bashrc \
#    && echo "export LANG=en_US.UTF-8" >>/etc/bash.bashrc  \
#    && echo "export LC_ALL=C" >>/etc/bash.bashrc  \
    && echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
    && echo "export LANGUAGE=C" >>/etc/bash.bashrc \
    && echo "export LANG=C" >>/etc/bash.bashrc  \
    && echo "export LC_ALL=C" >>/etc/bash.bashrc  \
    && /usr/sbin/locale-gen

EXPOSE 22 3306 5432 80 443 8080 9990
ENV init /lib/systemd/systemd
VOLUME [ "/sys/fs/cgroup" ]
ENTRYPOINT ["/lib/systemd/systemd"]
CMD ["systemd.unit=emergency.service"]

b. Create container devbox.


docker create -it -p 2200:22 -p 3306:3306 -p 5432:5432 -p 80:80 -p 443:443 \
    --privileged=true \
    --workdir="/projects" \
    --volume /dev/shm:/dev/shm \
    --volume $SSH_AUTH_SOCK:/ssh-agent \
    --volume /tmp/.X11-unix:/tmp/.X11-unix:ro \
    --env DISPLAY=$DISPLAY \
    --env SSH_AUTH_SOCK=/ssh-agent \
    --device /dev/snd \
    --name devbox test  /bin/bash

c. Start the container

docker start devbox

and make sure you can SSH to it as root/root:

ssh root@localhost -p 2200 ls /

d. Run playbook that takes the default mysql_packages and see it fail, like:
ansible-playbook -e ansible_ssh_port=2200 mysql.yml

- hosts: localhost
  become: yes
  roles:
     -  geerlingguy.mysql

e. After the test, you can clean up with: docker rm -f devbox; docker rmi test.

@mightydok

This comment has been minimized.

Show comment
Hide comment
@mightydok

mightydok Nov 9, 2015

@hrstoyanov, oh i see:

 -e ansible_ssh_port=2200

Ansible will not use this var without inventory file, so i think you run playbook on host server, NOT docker container.

So this line:

Aborting downgrade from (at least) 10.0 to 5.5.

I think apt raise an error when u try downgrade ur HOST mariadb 10 server to mysql 5.5.

You must use inventory file for ansible-playbook, just run:

echo localhost >> /etc/ansible/hosts

And try to rerun role, all will install successfully.

mightydok commented Nov 9, 2015

@hrstoyanov, oh i see:

 -e ansible_ssh_port=2200

Ansible will not use this var without inventory file, so i think you run playbook on host server, NOT docker container.

So this line:

Aborting downgrade from (at least) 10.0 to 5.5.

I think apt raise an error when u try downgrade ur HOST mariadb 10 server to mysql 5.5.

You must use inventory file for ansible-playbook, just run:

echo localhost >> /etc/ansible/hosts

And try to rerun role, all will install successfully.

@hrstoyanov

This comment has been minimized.

Show comment
Hide comment
@hrstoyanov

hrstoyanov Nov 9, 2015

@mightydok
Sorry, I do use inventory file, where I specify the ssh port and root ssh user and I do see the MariaDB getting installed in the container. Please create the inventory file to see the issue with MySQL.

[db]
#Ansible 1.9.x
localhost  ansible_ssh_user=root   ansible_ssh_port=2200

hrstoyanov commented Nov 9, 2015

@mightydok
Sorry, I do use inventory file, where I specify the ssh port and root ssh user and I do see the MariaDB getting installed in the container. Please create the inventory file to see the issue with MySQL.

[db]
#Ansible 1.9.x
localhost  ansible_ssh_user=root   ansible_ssh_port=2200
@mightydok

This comment has been minimized.

Show comment
Hide comment
@mightydok

mightydok Nov 9, 2015

@hrstoyanov i create inventory file and successfully use role for mysql install in just created container of debian stable. I recheck and sure that mysql install in container, so i cant reproduce your error.
Maybe you try change mariadb to mysql in container, i`am not sure that it will be so easy.
So just recreate container and try.

mightydok commented Nov 9, 2015

@hrstoyanov i create inventory file and successfully use role for mysql install in just created container of debian stable. I recheck and sure that mysql install in container, so i cant reproduce your error.
Maybe you try change mariadb to mysql in container, i`am not sure that it will be so easy.
So just recreate container and try.

@ryannealmes

This comment has been minimized.

Show comment
Hide comment
@ryannealmes

ryannealmes Jan 7, 2016

I think I am experiencing a similar issue.

vagrant@db:~$ sudo apt-get update
.
.
.
vagrant@db:~$ sudo apt-get install mysql-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 libmysqlclient18
  libterm-readkey-perl mysql-client-5.5 mysql-client-core-5.5 mysql-common
  mysql-server-5.5 mysql-server-core-5.5
Suggested packages:
  libclone-perl libmldbm-perl libnet-daemon-perl libplrpc-perl
  libsql-statement-perl libipc-sharedcache-perl tinyca mailx
The following NEW packages will be installed:
  libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18
  libterm-readkey-perl mysql-client-5.5 mysql-client-core-5.5 mysql-common
  mysql-server mysql-server-5.5 mysql-server-core-5.5
0 upgraded, 12 newly installed, 0 to remove and 52 not upgraded.
Need to get 9072 kB of archives.
After this operation, 96.7 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://archive.ubuntu.com/ubuntu/ trusty/main libaio1 amd64 0.3.109-4 [6364 B]
Get:2 http://archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-common all 5.5.46-0ubuntu0.14.04.2 [14.1 kB]
Get:3 http://archive.ubuntu.com/ubuntu/ trusty-updates/main libmysqlclient18 amd64 5.5.46-0ubuntu0.14.04.2 [597 kB]
Get:4 http://archive.ubuntu.com/ubuntu/ trusty/main libdbi-perl amd64 1.630-1 [879 kB]
Get:5 http://archive.ubuntu.com/ubuntu/ trusty/main libdbd-mysql-perl amd64 4.025-1 [99.3 kB]
Get:6 http://archive.ubuntu.com/ubuntu/ trusty/main libterm-readkey-perl amd64 2.31-1 [27.4 kB]
Get:7 http://archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-client-core-5.5 amd64 5.5.46-0ubuntu0.14.04.2 [706 kB]
Get:8 http://archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-client-5.5 amd64 5.5.46-0ubuntu0.14.04.2 [1461 kB]
Get:9 http://archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-server-core-5.5 amd64 5.5.46-0ubuntu0.14.04.2 [3223 kB]
Get:10 http://archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-server-5.5 amd64 5.5.46-0ubuntu0.14.04.2 [1981 kB]
Get:11 http://archive.ubuntu.com/ubuntu/ trusty/main libhtml-template-perl all 2.95-1 [65.5 kB]
Get:12 http://archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-server all 5.5.46-0ubuntu0.14.04.2 [12.4 kB]
Fetched 9072 kB in 8s (1071 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 ... 61004 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.46-0ubuntu0.14.04.2_all.deb ...
Unpacking mysql-common (5.5.46-0ubuntu0.14.04.2) ...
Selecting previously unselected package libmysqlclient18:amd64.
Preparing to unpack .../libmysqlclient18_5.5.46-0ubuntu0.14.04.2_amd64.deb ...
Unpacking libmysqlclient18:amd64 (5.5.46-0ubuntu0.14.04.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 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 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 mysql-client-core-5.5.
Preparing to unpack .../mysql-client-core-5.5_5.5.46-0ubuntu0.14.04.2_amd64.deb ...
Unpacking mysql-client-core-5.5 (5.5.46-0ubuntu0.14.04.2) ...
Selecting previously unselected package mysql-client-5.5.
Preparing to unpack .../mysql-client-5.5_5.5.46-0ubuntu0.14.04.2_amd64.deb ...
Unpacking mysql-client-5.5 (5.5.46-0ubuntu0.14.04.2) ...
Selecting previously unselected package mysql-server-core-5.5.
Preparing to unpack .../mysql-server-core-5.5_5.5.46-0ubuntu0.14.04.2_amd64.deb ...
Unpacking mysql-server-core-5.5 (5.5.46-0ubuntu0.14.04.2) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up mysql-common (5.5.46-0ubuntu0.14.04.2) ...
Selecting previously unselected package mysql-server-5.5.
(Reading database ... 61367 files and directories currently installed.)
Preparing to unpack .../mysql-server-5.5_5.5.46-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
/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
Unpacking mysql-server-5.5 (5.5.46-0ubuntu0.14.04.2) ...
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 mysql-server.
Preparing to unpack .../mysql-server_5.5.46-0ubuntu0.14.04.2_all.deb ...
Unpacking mysql-server (5.5.46-0ubuntu0.14.04.2) ...
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up libaio1:amd64 (0.3.109-4) ...
Setting up libmysqlclient18:amd64 (5.5.46-0ubuntu0.14.04.2) ...
Setting up libdbi-perl (1.630-1) ...
Setting up libdbd-mysql-perl (4.025-1) ...
Setting up libterm-readkey-perl (2.31-1) ...
Setting up mysql-client-core-5.5 (5.5.46-0ubuntu0.14.04.2) ...
Setting up mysql-client-5.5 (5.5.46-0ubuntu0.14.04.2) ...
Setting up mysql-server-core-5.5 (5.5.46-0ubuntu0.14.04.2) ...
Setting up mysql-server-5.5 (5.5.46-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
/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
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package mysql-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up libhtml-template-perl (2.95-1) ...
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.5; however:
  Package mysql-server-5.5 is not configured yet.

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

This is the first thing I do an a fresh ubuntu/trusty64 box and I get these errors. I am not that familiar with these types of issues. Does this mean that mysql-server can't be installed on ubuntu systems? Is there a way for me to change the package being installed?

New to ansible ... would really like to be able to use this ansible role :)

ryannealmes commented Jan 7, 2016

I think I am experiencing a similar issue.

vagrant@db:~$ sudo apt-get update
.
.
.
vagrant@db:~$ sudo apt-get install mysql-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 libmysqlclient18
  libterm-readkey-perl mysql-client-5.5 mysql-client-core-5.5 mysql-common
  mysql-server-5.5 mysql-server-core-5.5
Suggested packages:
  libclone-perl libmldbm-perl libnet-daemon-perl libplrpc-perl
  libsql-statement-perl libipc-sharedcache-perl tinyca mailx
The following NEW packages will be installed:
  libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18
  libterm-readkey-perl mysql-client-5.5 mysql-client-core-5.5 mysql-common
  mysql-server mysql-server-5.5 mysql-server-core-5.5
0 upgraded, 12 newly installed, 0 to remove and 52 not upgraded.
Need to get 9072 kB of archives.
After this operation, 96.7 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://archive.ubuntu.com/ubuntu/ trusty/main libaio1 amd64 0.3.109-4 [6364 B]
Get:2 http://archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-common all 5.5.46-0ubuntu0.14.04.2 [14.1 kB]
Get:3 http://archive.ubuntu.com/ubuntu/ trusty-updates/main libmysqlclient18 amd64 5.5.46-0ubuntu0.14.04.2 [597 kB]
Get:4 http://archive.ubuntu.com/ubuntu/ trusty/main libdbi-perl amd64 1.630-1 [879 kB]
Get:5 http://archive.ubuntu.com/ubuntu/ trusty/main libdbd-mysql-perl amd64 4.025-1 [99.3 kB]
Get:6 http://archive.ubuntu.com/ubuntu/ trusty/main libterm-readkey-perl amd64 2.31-1 [27.4 kB]
Get:7 http://archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-client-core-5.5 amd64 5.5.46-0ubuntu0.14.04.2 [706 kB]
Get:8 http://archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-client-5.5 amd64 5.5.46-0ubuntu0.14.04.2 [1461 kB]
Get:9 http://archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-server-core-5.5 amd64 5.5.46-0ubuntu0.14.04.2 [3223 kB]
Get:10 http://archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-server-5.5 amd64 5.5.46-0ubuntu0.14.04.2 [1981 kB]
Get:11 http://archive.ubuntu.com/ubuntu/ trusty/main libhtml-template-perl all 2.95-1 [65.5 kB]
Get:12 http://archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-server all 5.5.46-0ubuntu0.14.04.2 [12.4 kB]
Fetched 9072 kB in 8s (1071 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 ... 61004 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.46-0ubuntu0.14.04.2_all.deb ...
Unpacking mysql-common (5.5.46-0ubuntu0.14.04.2) ...
Selecting previously unselected package libmysqlclient18:amd64.
Preparing to unpack .../libmysqlclient18_5.5.46-0ubuntu0.14.04.2_amd64.deb ...
Unpacking libmysqlclient18:amd64 (5.5.46-0ubuntu0.14.04.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 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 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 mysql-client-core-5.5.
Preparing to unpack .../mysql-client-core-5.5_5.5.46-0ubuntu0.14.04.2_amd64.deb ...
Unpacking mysql-client-core-5.5 (5.5.46-0ubuntu0.14.04.2) ...
Selecting previously unselected package mysql-client-5.5.
Preparing to unpack .../mysql-client-5.5_5.5.46-0ubuntu0.14.04.2_amd64.deb ...
Unpacking mysql-client-5.5 (5.5.46-0ubuntu0.14.04.2) ...
Selecting previously unselected package mysql-server-core-5.5.
Preparing to unpack .../mysql-server-core-5.5_5.5.46-0ubuntu0.14.04.2_amd64.deb ...
Unpacking mysql-server-core-5.5 (5.5.46-0ubuntu0.14.04.2) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up mysql-common (5.5.46-0ubuntu0.14.04.2) ...
Selecting previously unselected package mysql-server-5.5.
(Reading database ... 61367 files and directories currently installed.)
Preparing to unpack .../mysql-server-5.5_5.5.46-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
/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
Unpacking mysql-server-5.5 (5.5.46-0ubuntu0.14.04.2) ...
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 mysql-server.
Preparing to unpack .../mysql-server_5.5.46-0ubuntu0.14.04.2_all.deb ...
Unpacking mysql-server (5.5.46-0ubuntu0.14.04.2) ...
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up libaio1:amd64 (0.3.109-4) ...
Setting up libmysqlclient18:amd64 (5.5.46-0ubuntu0.14.04.2) ...
Setting up libdbi-perl (1.630-1) ...
Setting up libdbd-mysql-perl (4.025-1) ...
Setting up libterm-readkey-perl (2.31-1) ...
Setting up mysql-client-core-5.5 (5.5.46-0ubuntu0.14.04.2) ...
Setting up mysql-client-5.5 (5.5.46-0ubuntu0.14.04.2) ...
Setting up mysql-server-core-5.5 (5.5.46-0ubuntu0.14.04.2) ...
Setting up mysql-server-5.5 (5.5.46-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
/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
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package mysql-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up libhtml-template-perl (2.95-1) ...
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.5; however:
  Package mysql-server-5.5 is not configured yet.

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

This is the first thing I do an a fresh ubuntu/trusty64 box and I get these errors. I am not that familiar with these types of issues. Does this mean that mysql-server can't be installed on ubuntu systems? Is there a way for me to change the package being installed?

New to ansible ... would really like to be able to use this ansible role :)

@geerlingguy

This comment has been minimized.

Show comment
Hide comment
@geerlingguy

geerlingguy Jan 7, 2016

Owner

Typically you'd use this role to do the complete installation; does this role fail, or does the failure only occur if you ssh in and run apt-get install mysql-server?

Owner

geerlingguy commented Jan 7, 2016

Typically you'd use this role to do the complete installation; does this role fail, or does the failure only occur if you ssh in and run apt-get install mysql-server?

@geerlingguy

This comment has been minimized.

Show comment
Hide comment
@geerlingguy

geerlingguy Jan 7, 2016

Owner

As an aside, I've been using this role with Raspbian 8/Jessie for Raspberry Pi work and haven't encountered any issues. I wonder if the AMD64 packages for MySQL in Debian's repos are at fault?

Owner

geerlingguy commented Jan 7, 2016

As an aside, I've been using this role with Raspbian 8/Jessie for Raspberry Pi work and haven't encountered any issues. I wonder if the AMD64 packages for MySQL in Debian's repos are at fault?

@ryannealmes

This comment has been minimized.

Show comment
Hide comment
@ryannealmes

ryannealmes Jan 8, 2016

Originally I thought it was this package causing the problem (sorry), but then I managed to recreate the issue on a fresh install of ubuntu/trusty64 (no other changes) and executing apt-get install mysql-server. I also tried to update the apt-get repository, but that didn't work either. I also tried fixing the locale issue, but that didn't help the situation either.

I think you are correct, it looks like Debian's repos are the problem. I will see if I can get a response from them on their forums. Cheers.

ryannealmes commented Jan 8, 2016

Originally I thought it was this package causing the problem (sorry), but then I managed to recreate the issue on a fresh install of ubuntu/trusty64 (no other changes) and executing apt-get install mysql-server. I also tried to update the apt-get repository, but that didn't work either. I also tried fixing the locale issue, but that didn't help the situation either.

I think you are correct, it looks like Debian's repos are the problem. I will see if I can get a response from them on their forums. Cheers.

@geerlingguy

This comment has been minimized.

Show comment
Hide comment
@geerlingguy

geerlingguy Mar 27, 2016

Owner

I'm going to close out this issue as I can't reproduce on Ubuntu 14.04, Ubuntu 16.04, or Debian 8 currently. Probably a temporary packaging issue.

Owner

geerlingguy commented Mar 27, 2016

I'm going to close out this issue as I can't reproduce on Ubuntu 14.04, Ubuntu 16.04, or Debian 8 currently. Probably a temporary packaging issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment