0

I'm trying to install MySQL on my Ubuntu 16.04 VPS, but when I try to install it using sudo apt install mysql-server mysql-client (or even sudo apt install mysql-server), I get the next errors:

Setting up mysql-server-5.7 (5.7.22-0ubuntu0.16.04.1) ...
/var/lib/dpkg/info/mysql-server-5.7.postinst: line 143: /usr/share/mysql-common/                                                                                                                                                             configure-symlinks: No such file or directory
dpkg: error processing package mysql-server-5.7 (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up libhtml-tagset-perl (3.20-2) ...
Setting up liburi-perl (1.71-1) ...
Setting up libhtml-parser-perl (3.72-1) ...
Setting up libcgi-pm-perl (4.26-1) ...
Setting up libfcgi-perl (0.77-1build1) ...
Setting up libcgi-fast-perl (1:2.10-1) ...
Setting up libencode-locale-perl (1.05-1) ...
Setting up libhtml-template-perl (2.95-2) ...
Setting up libtimedate-perl (2.3000-2) ...
Setting up libhttp-date-perl (6.02-1) ...
Setting up libio-html-perl (1.001-1) ...
Setting up liblwp-mediatypes-perl (6.02-1) ...
Setting up libhttp-message-perl (6.11-1) ...
Setting up mysql-client (5.7.22-0ubuntu0.16.04.1) ...
dpkg: dependency problems prevent configuration of mysql-server:
No apport report written because the error message indicates its a followup erro                                                                                                                                                             r from a previous failure.
                           mysql-server depends on mysql-server-5.7; however:
  Package mysql-server-5.7 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for systemd (229-4ubuntu21.2) ...
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
 mysql-server-5.7
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

I already tried purging all mysql packages and dependencies using

sudo dpkg -l | grep mysql

sudo apt-get --purge autoremove

rm -r /var/lib/mysql

reboot

but so far no luck, can please someone help me to solve this?, i'm really new into Ubuntu, and i can't get this to work. also this displays when i type service mysql status:

root@ubuntu:~# service mysql status
● mysql.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

Jul 24 07:06:10 ubuntu systemd[1]: Stopped MySQL Community Server.
Jul 24 07:14:05 ubuntu systemd[1]: Stopped MySQL Community Server.
6
  • The standard commands in cases like these are sudo dpkg --configure -a followed by sudo apt install -f.
    – Jos
    Jul 24, 2018 at 7:15
  • this is the output: root@ubuntu:~# sudo dpkg --configure -a root@ubuntu:~# sudo apt install -f Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    – Roberth
    Jul 24, 2018 at 7:16
  • or this after trying to install mysql
    – Roberth
    Jul 24, 2018 at 7:19
  • Why not specify the package? sudo apt install mysql-server-5.7?
    – xR34P3Rx
    Jul 24, 2018 at 7:24
  • because then this happens
    – Roberth
    Jul 24, 2018 at 7:25

0

You must log in to answer this question.

Browse other questions tagged .