I recently tried to install MySQL server, but I am stuck with this error:

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

This is what I tried to do to install MySQL server:

sudo apt-get install mysql-server

but after typing this command I got this error:

dev@webos-develop:/var/lib/dpkg/info$ sudo apt-get install mysql-
Reading package lists... Done
Building dependency tree       
Reading state information... Done
mysql-server is already the newest version.
The following packages were automatically installed and are no longer required:
  gnome-video-effects gyp libc-ares-dev libc-ares2 libjs-inherits libjs-jquery
  libjs-node-uuid libjs-underscore libv8-3.14-dev libv8-3.14.5 node-abbrev
  node-ansi node-ansi-color-table node-archy node-async node-block-stream
  node-combined-stream node-cookie-jar node-delayed-stream node-forever-agent
  node-form-data node-fstream node-fstream-ignore node-github-url-from-git
  node-glob node-graceful-fs node-gyp node-inherits node-ini
  node-json-stringify-safe node-lockfile node-lru-cache node-mime
  node-minimatch node-mkdirp node-mute-stream node-node-uuid node-nopt
  node-normalize-package-data node-npmlog node-once node-osenv node-qs
  node-read node-read-package-json node-request node-retry node-rimraf
  node-semver node-sha node-sigmund node-slide node-tar node-tunnel-agent
  node-underscore node-which
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up mysql-server-5.6 (5.6.25-0ubuntu1) ...
/var/lib/dpkg/info/mysql-server-5.6.postinst: line 95: /usr/share/mysql-common/configure-symlinks: No such file or directory
dpkg: error processing package mysql-server-5.6 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.6; however:
  Package mysql-server-5.6 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                          Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

after i used

apt-cache policy mysql-server mysql-common

I am getting the output as

  Installed: 5.6.25-0ubuntu1
  Candidate: 5.6.25-0ubuntu1
  Version table:
 *** 5.6.25-0ubuntu1 0
        500 http://in.archive.ubuntu.com/ubuntu/ wily/main amd64 Packages
        100 /var/lib/dpkg/status
  Installed: 10.1.16+maria-1~wily
  Candidate: 10.1.16+maria-1~wily
  Version table:
 *** 10.1.16+maria-1~wily 0
        500 http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.1/ubuntu/ wily/main amd64 Packages
        100 /var/lib/dpkg/status
     5.6.25-0ubuntu1 0
        500 http://in.archive.ubuntu.com/ubuntu/ wily/main amd64 Packages
  • Please edit your question to include the output of apt-cache policy mysql-server mysql-common – steeldriver Mar 9 '17 at 12:24
  • @steeldriver please check my edited question – hai_v Mar 9 '17 at 12:32
  • So... you appear to have a version of mariadb installed already - and possibly a mess of old and new repositories in your sources.list – steeldriver Mar 9 '17 at 12:38
  • @steeldriver yeah thanks for this inforamtion it is very helpful will you please give me some information about resolving the error – hai_v Mar 9 '17 at 12:41

/usr/share/mysql-common/configure-symlinks: No such file or directory

See: https://bugs.launchpad.net/ubuntu/+source/mysql-5.6/+bug/1455818 This problem was fixed in 5.6.27 version according to bug report.

Update: OP says he uses Ubuntu 15.10 even though he has a tag 14.04 in his question.

While 15.10 is EOL, you should have access to 5.6.31 version of MySQL https://launchpad.net/ubuntu/wily/+package/mysql-server

The sources.list file lines you posted show xenial (16.04). I believe you upgraded the system. I hope everything is working now :)

|improve this answer|||||
  • i tried apt-get update now and then i run the command apt-get install mysql-server – hai_v Mar 9 '17 at 12:35
  • You put a tag 14.04 but your apt-cache policy shows 'wily' which version are you using? In your /etc/apt/sources.list make sure that universe is not commented out. If it was commented, uncomment it and then run apt-get update and try again to install. – yurtesen Mar 9 '17 at 12:51
  • Release: 15.10 Codename: wily and in source list it is not commented – hai_v Mar 9 '17 at 12:54
  • # # Uncomment the following two lines to add software from Canonical's # # 'partner' repository. # # This software is not part of Ubuntu, but is offered by Canonical and the # # respective vendors as a service to Ubuntu users. # deb archive.canonical.com/ubuntu wily partner # deb-src archive.canonical.com/ubuntu wily partner – hai_v Mar 9 '17 at 12:58
  • If you are using Wily, why you put a tag 14.04? Just to confuse us? Please update your post and add the output of this command : grep -v -e '^#' -e '^$' /etc/apt/sources.list Also, Wily is EOL so you must upgrade it anyway. Perhaps you should upgrade to Xenial. – yurtesen Mar 9 '17 at 13:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.