title: Couldn't install mysql-server E: Sub-process /usr/bin/dpkg returned an error code 1
body: <p>Cant reinstall mysql-service</p>
  
  <pre><code>root@xxx:~# apt-get install mysql-server -y
  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 mailx
  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 1760 kB of archives.
  After this operation, 32.8 MB of additional disk space will be used.
  Get:1 http://archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-server-5.5 amd64 5.5.47-0ubuntu0.14.04.1 [1748 kB]
  Get:2 http://archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-server all 5.5.47-0ubuntu0.14.04.1 [11.8 kB]
  Fetched 1760 kB in 2s (669 kB/s)
  debconf: unable to initialize frontend: Dialog
  debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76, &lt;&gt; line 2.)
  debconf: falling back to frontend: Readline
  Preconfiguring packages ...
  (Reading database ... 15862 files and directories currently installed.)
  Preparing to unpack .../mysql-server-5.5_5.5.47-0ubuntu0.14.04.1_amd64.deb ...
  debconf: unable to initialize frontend: Dialog
  debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
  debconf: falling back to frontend: Readline
  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.47-0ubuntu0.14.04.1_amd64.deb (--unpack):
   subprocess new pre-installation script returned error exit status 1
  debconf: unable to initialize frontend: Dialog
  debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
  debconf: falling back to frontend: Readline
  Selecting previously unselected package mysql-server.
  Preparing to unpack .../mysql-server_5.5.47-0ubuntu0.14.04.1_all.deb ...
  Unpacking mysql-server (5.5.47-0ubuntu0.14.04.1) ...
  Errors were encountered while processing:
   /var/cache/apt/archives/mysql-server-5.5_5.5.47-0ubuntu0.14.04.1_amd64.deb
  E: Sub-process /usr/bin/dpkg returned an error code (1)
  </code></pre>
  
  <p>I've tried "sudo apt-get clean" and "sudo apt-get install -f" yet it still shows the above message.</p>
  
  <p>Runnning "sudo dpkg --configure -a" gives me the below message.</p>
  
  <pre><code>root@xxx:~# 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
  </code></pre>