A
A
at0m1x2017-04-24 13:07:02
MySQL
at0m1x, 2017-04-24 13:07:02

What does the error mean when installing mysql-server?

Debian GNU/Linux 8.7 (jessie)
I want to install the mysql-server package, I execute the command:
# apt-get install mysql-server
As a result I get an error:

E: Sub-process /usr/bin/dpkg returned an error code (1)

Here is the full output:
[email protected]:~# apt-get install mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  mysql-server-5.5
Suggested packages:
  tinyca
The following NEW packages will be installed:
  mysql-server mysql-server-5.5
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/1,846 kB of archives.
After this operation, 32.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
(Reading database ... 48232 files and directories currently installed.)
Preparing to unpack .../mysql-server-5.5_5.5.54-0+deb8u1_amd64.deb ...
Aborting downgrade from (at least) 10.1 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.54-0+deb8u1_amd64.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
Selecting previously unselected package mysql-server.
Preparing to unpack .../mysql-server_5.5.54-0+deb8u1_all.deb ...
Unpacking mysql-server (5.5.54-0+deb8u1) ...
Errors were encountered while processing:
 /var/cache/apt/archives/mysql-server-5.5_5.5.54-0+deb8u1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

[email protected]:~# apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  mysql-server-5.5
Suggested packages:
  tinyca
The following NEW packages will be installed:
  mysql-server-5.5
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/1,766 kB of archives.
After this operation, 32.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
(Reading database ... 48232 files and directories currently installed.)
Preparing to unpack .../mysql-server-5.5_5.5.54-0+deb8u1_amd64.deb ...
Aborting downgrade from (at least) 10.1 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.54-0+deb8u1_amd64.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/mysql-server-5.5_5.5.54-0+deb8u1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

[email protected]:~# dpkg --configure -a
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.5; however:
  Package mysql-server-5.5 is not installed.

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

What does this error mean and how to overcome it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
at0m1x, 2017-04-24
@at0m1x

I have an experimental system, so you can delete / install anything, there is no critical data to lose.
The problem was that the system had leftovers from old installations of other databases, such as MariaDB, Percona, MySQL. And although all the previous listed databases were removed using apt purge, some files / directories / scripts from these databases still remained in the system somewhere. And these "leftovers" somehow conflicted with a new installation of MySQL.
So I solved this problem like this:

sudo apt-get purge .*mariadb.* .*mysql.*
sudo apt-get autoremove

But most importantly, we are looking for and deleting the remnants:
This command will give a list of the files / directories / scripts of the past databases remaining after the deletion . All of them must also be removed.
After that, you can install MySQL as usual:
Everything should go OK, without any Errors.

R
Roman Frank, 2017-04-24
@Akellacom

Have you been banned on Google? :)
forum.ubuntu.ru/index.php?topic=46208.0
morikoff.ru/e-sub-process-usr-bin-dpkg-returned-er...
https://askubuntu.com/questions/688338/e -sub-proce...
https://ubuntuforums.org/showthread.php?t=1642173

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question