title: Sub-process /usr/bin/dpkg returned an error code (1) While Installing mysql
body: <p>I am trying to install <code>mysql-server-5.5</code> by <code>apt-get install mysql-server-5.5</code> and I see this error - <code>Sub-process /usr/bin/dpkg returned an error code (1)</code> </p>
  
  <p>Output of <code>sudo dpkg --configure -a</code></p>
  
  <pre><code>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>
  
  <p>Output of <code>sudo apt-get -f install</code></p>
  
  <pre><code>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 mailx
  The following NEW packages will be installed:
    mysql-server-5.5
  0 upgraded, 1 newly installed, 0 to remove and 60 not upgraded.
  1 not fully installed or removed.
  Need to get 0 B/1981 kB of archives.
  After this operation, 32.7 MB of additional disk space will be used.
  Do you want to continue? [Y/n] y
  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 ...
  (Reading database ... 95180 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
  Aborting downgrade from (at least) 5.6 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-0ubuntu0.14.04.2_amd64.deb (--unpack):
   subprocess new pre-installation script returned error exit status 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
  Errors were encountered while processing:
   /var/cache/apt/archives/mysql-server-5.5_5.5.46-0ubuntu0.14.04.2_amd64.deb
  E: Sub-process /usr/bin/dpkg returned an error code (1)
  </code></pre>
  
  <p>Thanks for any help.</p>