1
whatever7788@ubuntuServer:~$ sudo apt-get install pptpd
Reading package lists... Done
Building dependency tree
Reading state information... Done
pptpd is already the newest version.
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
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.5 (5.5.44-0ubuntu0.14.04.1) ...
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package mysql-server-5.5 (--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.5; however:
  Package mysql-server-5.5 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mysql-server-5.5
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
whatever7788@ubuntuServer:~$

I am not able to install pretty much everything on my ubuntu server. It started from 3 days ago when I tried to install MySQL on the server. When I was trying to install MySQL, I prompted me to enter a password, after I typed in and continue it gave me this screen below:

┌───────────────────────Configuring mysql-server-5.5─────────────────────────┐
│ Unable to set password for the MySQL "root" user                           │
│                                                                            │
│ An error occurred while setting the password for the MySQL                 │
│ administrative user. This may have happened because the account already    │
│ has a password, or because of a communication problem with the MySQL       │
│ server.                                                                    │
│                                                                            │
│ You should check the account's password after the package installation.    │
│                                                                            │
│ Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for     │
│ more information.                                                          │
│                                                                            │
│                                                                            │
├────────────────────────────────────────────────────────────────────────────┤
                                 │ < OK > │
└────────────────────────────────────────────────────────────────────────────┘

Then I clicked on "OK". I got the error:

start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package mysql-server-5.5 (--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.5; however:
  Package mysql-server-5.5 is not configured yet.

dpkg: error processing package mysql-server (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: mysql-server-5.5 mysql-server E: Sub-process /usr/bin/dpkg returned an error code (1) whatever7788@ubuntuServer:~$

Today when I was trying to install pptpd. I got the same error... So I think the error started since MySQL server installation failed.

I tried real hard to get MySQL installed and looked through all the solutions on the internet but still can't have it installed.

I have tried everything below but the problem remains:

dpkg -S etc/mysql
aptitude purge mysql-server --purge-unused
sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean
sudo rm -rf /var/lib/mysql
sudo rm -rf /etc/mysql
sudo dpkg --configure -a
sudo apt-get update 

I tried this as well with no luck:

sudo apt-get purge mysql-server mysql-client mysql-common mysql-client-5.5 mysql-server-5.5 
sudo dpkg -i mysql-5.6.13-debian6.0-i686.deb 
sudo apt-get install mysql-server

Can anyone please help me? Thanks in advance.

What Ever
  • 29
  • 1
  • 4

1 Answers1

1

You have to change the postrm to purge the package:

  1. Open the file

    sudo nano /var/lib/dpkg/info/mysql-server-5.5.postrm
    
  2. Find the code snippet

    if [ -n "`$MYADMIN ping 2>/dev/null`" ]; then
      stop_server
      sleep 2
    fi
    

    and comment the line stop_server

    if [ -n "`$MYADMIN ping 2>/dev/null`" ]; then
      # stop_server
      sleep 2
    fi
    
  3. Save the file and purge again

    sudo apt-get purge mysql-server-5.5
    

After that, you have repaired your system and you can install and uninstall packages again.

A.B.
  • 92,125