Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.
$ sudo aptitude install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
The following NEW packages will be installed:
  libhtml-template-perl{a} mysql-server mysql-server-5.0{a} mysql-server-core-5.0{a}
0 packages upgraded, 4 newly installed, 0 to remove and 12 not upgraded.
Need to get 0B/27.7MB of archives. After unpacking 91.1MB will be used.
Do you want to continue? [Y/n/?] y
Writing extended state information... Done
Preconfiguring packages ...
Selecting previously deselected package mysql-server-core-5.0.
(Reading database ... 17022 files and directories currently installed.)
Unpacking mysql-server-core-5.0 (from .../mysql-server-core-5.0_5.1.30really5.0.75-0ubuntu10.3_amd64.deb) ...
Selecting previously deselected package mysql-server-5.0.
Unpacking mysql-server-5.0 (from .../mysql-server-5.0_5.1.30really5.0.75-0ubuntu10.3_amd64.deb) ...
Selecting previously deselected package libhtml-template-perl.
Unpacking libhtml-template-perl (from .../libhtml-template-perl_2.9-1_all.deb) ...
Selecting previously deselected package mysql-server.
Unpacking mysql-server (from .../mysql-server_5.1.30really5.0.75-0ubuntu10.3_all.deb) ...
Setting up mysql-server-core-5.0 (5.1.30really5.0.75-0ubuntu10.3) ...
Setting up mysql-server-5.0 (5.1.30really5.0.75-0ubuntu10.3) ...
 * Stopping MySQL database server mysqld                                                                                                                                                         [ OK ]
/var/lib/dpkg/info/mysql-server-5.0.postinst: line 144: /etc/mysql/conf.d/old_passwords.cnf: No such file or directory
dpkg: error processing mysql-server-5.0 (--configure):
 subprocess post-installation script returned error exit status 1
Setting up libhtml-template-perl (2.9-1) ...
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.0; however:
  Package mysql-server-5.0 is not configured yet.
dpkg: error processing 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:
 mysql-server-5.0
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up mysql-server-5.0 (5.1.30really5.0.75-0ubuntu10.3) ...
 * Stopping MySQL database server mysqld                                                                                                                                                         [ OK ]
/var/lib/dpkg/info/mysql-server-5.0.postinst: line 144: /etc/mysql/conf.d/old_passwords.cnf: No such file or directory
dpkg: error processing mysql-server-5.0 (--configure):
 subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.0; however:
  Package mysql-server-5.0 is not configured yet.
dpkg: error processing mysql-server (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mysql-server-5.0
 mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Writing extended state information... Done

Before I installed it, I ran this:

sudo aptitude purge mysql-server mysql-server-5.0

This has happened before. I remember before, I did something with dpkg with fixed it.

share|improve this question

2 Answers 2

ugly way, but try it:

sudo bash
# at this point take backup of your /etc/mysql and /var/lib/mysql
apt-get remove --purge mysql-server mysql-server-5.0
# if above fails
rm -rf /etc/mysql
echo "exit 0" > /etc/init.d/mysql
# and again
apt-get remove --purge mysql-server mysql-server-5.0

# and try from scratch:
apt-get install mysql-server-5.0
share|improve this answer
    
No, doesn't work. Same thing happens. (By the way, I don't even have init.d/mysql anymore) –  Alex May 3 '10 at 8:07
    
@Alex - can you be more specific? –  pQd May 3 '10 at 8:09
    
the same message happens as posted in my Original post –  Alex May 3 '10 at 8:15
    
@Alex - what happens if you run apt-get remove --purge mysql* - can you paste it somewhere? –  pQd May 3 '10 at 8:28
    
Solved it pQd, but thanks for your help. BTW, the mysql* thing is right! –  Alex May 3 '10 at 8:30
up vote 1 down vote accepted

I solved it. I had to remove mysql-common as well as mysql-server and mysql-server-5.0

Then, I reinstalled it all.

share|improve this answer
    
how exactly you do that? –  Jim Thio Aug 7 '12 at 6:34
    
could you please paste the commands? –  jpganz18 Jan 30 '13 at 16:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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