Mysql-server-5.0 installation failed during configuration
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Mysql-server-5.0 installation failed during configuration
Code:
mgarsenal:/home/daniel# apt-get install mysql-server-5.0
Reading package lists... Done
Building dependency tree
Reading state information... Done
mysql-server-5.0 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1275 not upgraded.
2 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up mysql-server-5.0 (5.0.51a-12) ...
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
invoke-rc.d: initscript mysql, action "start" failed.
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
E: Sub-process /usr/bin/dpkg returned an error code (1)
So I rebooted my computer today and Mysql failed to start up. Figuring that maybe something was funny and that I should just get the newer package version, I install that. Then it errors on me and spits and hisses.
How does one go about diagnosing this kind of problem? I just installed sql for Mediawiki, I don't actually know much about it other than "it's a database thing".
I would first throw away the existing installations that seem to be broken then reinstall the server. I think it is a good idea to throw away the client too and take the one corresponding to your new server.
J-Ray: I'll try the uninstall/reinstall thing as more of a "last resort". Also, would such a process kill off my existing databases? Because that's really not an option if it's in any way avoidable.
Farslayer: Yeah, I'm using testing for some stuff. I can't fully upgrade to testing because it crashes my sound, and no one has ever been able to explain to me why, so I just stick with a stable/testing mix (primarily stable).
Code:
mgarsenal:/home/daniel# uname -a
Linux mgarsenal 2.6.18-6-486 #1 Fri Jun 6 21:47:01 UTC 2008 i686 GNU/Linux
mgarsenal:/home/daniel# cat /etc/debian_version
4.0
mgarsenal:/home/daniel# cat /etc/apt/sources.list
#
# deb cdrom:[Debian GNU/Linux 4.0 r1 _Etch_ - Official i386 CD Binary-1 20070819-11:52]/ etch contrib main
# deb cdrom:[Debian GNU/Linux 4.0 r1 _Etch_ - Official i386 CD Binary-1 20070819-11:52]/ etch contrib main
deb http://ftp.debian.org/debian/ etch main contrib non-free
deb-src http://ftp.debian.org/debian/ etch main contrib non-free
deb http://http.us.debian.org/debian/ testing main contrib non-free
deb-src http://http.us.debian.org/debian/ testing main contrib non-free
#deb http://haskell-unsafe.alioth.debian.org/archive/i386 . unstable testing stable
deb http://security.debian.org/ etch/updates main contrib non-free
deb-src http://security.debian.org/ etch/updates main contrib non-free
And yes, the version trying to be installed is the testing version. However, as mentioned, it also failed to startup when I had the stable version.
Apt pinning only helps during an "apt-get upgrade". I never use the upgrade command, I just install newer versions of specific pieces of software as they come out. What's worse, I don't even know which packages I need to have pinned to stable to keep my sound working other than "none of the ones I've moved to testing so far since the reinstall". At best, I'd just pin everything to stable and be stuck with my MySql database not starting up.
The dependency issue is just because it can't configure mysql-server-5.0 which it can't do because it's failing to startup for some reason. Even before I tried to upgrade to the newest testing of mysql-server, it was failing to start up.
But my question to J-Ray also applies to you Farslayer: does doing an uninstall, purge, and reinstall keep my existing databases or not?
Pinning ensures you don't get packages from the other branch that you don't want accidentally. Having both sources in your list without pinning is asking for trouble. You have no clue really what packages on your system are from which branch which is most likely the cause of your dependency issue. You may believe it has no effect unless you do an upgrade.. but can you really be sure ? If pinning isn't really necessary except for upgrade, then why bother having it as part of apt at all ?
If you first installed mysql-server-5.0 from testing it would have updated other libraries on your system that mysql server needs. then when you uninstalled that it would have left those libraries behind because they are newer versions than etch would have and other packages rely on those libraries, they will not automatically be downgraded. Then you tried the version of Mysql-server-5.0 from the stable repository which will no longer run because the dependencies are no longer the correct version for the stable mysql-server-5.0 package.
If not in that order, then some other package you pulled from somewhere has borked the dependency requirements for you. you can go through and check every dependency in the list and manually work them out to versions that should allow you to get mysql-server running again..
Okay fine. Pinning is great. I've set it up before and it's let me down, but I'll try using it again some time.
However, SQL failed to start before I ever even tried to install the newest version of the server, Then I tried Apt and it still failed. I highly suspect that the initial failure was the main problem, and the installation of the newest version simply has inherited that problem.
And you still didn't mention: does doing an uninstall, purge, and reinstall keep my existing databases or not?
You did not follow the first link I provided which answered that question...
The second and Third Links are to the Dependency lists for mysql-server-5.0 for etch and Lenny. Decide which you will use (stable or testing) then check the version of every installed dependency in the list.. Until you verify they are all the correct versions theres not much point in speculating what else nmay be causing your problem. .
This is fun: According to the Lenny page [mysql-server-5.0 (5.0.51a-12)] I need adduser >= 3.40, yet according to Synaptic, I've got 3.102 installed and the newest version available is 3.110. According to the adduser page itself http://packages.debian.org/lenny/adduser then 3.108 is the newest available version. But I'll upgrade to 3.110.
Debconf is listed twice, but i have sufficient version for both listings. I'll upgrade it anyways (to 1.5.22). mysql-common is correct. libc6 is sufficient (2.7-5). I've got libdbi-perl and I'll upgrade it to 1.605-1 even though no version is listed. libgcc1 is above the version listed (1:4.3.1-2). libmysqlclient15off is fine (5.0.51a-12). libncurses5 is good (5.6+20080308-1). libreadline5 is fine (5.2-2). libstdc++6 is fine (4.3.0-5).
libwrap0 is very strange. It says I need >= 7.6-4~, I've got 7.6.dbs-13, and the newest available version is 7.6.q-15. So i'll upgrade it, but i think i'm already fine.
lsb-base is fine (3.1-23.2etch1). mysql-client-5.0 is fine (5.0.51a-12). passwd is fine (1:4.1.1-1). perl is fine (5.10.0-11). psmisc is fine (22.3-1). zlib1g looks good (1:1.2.3.3.dfsg-12). I even have libhtml-template-perl and mailx installed.
Apply these upgrades:
Quote:
Originally Posted by An Error Occured
E: mysql-server-5.0: subprocess post-installation script returned error exit status 1
E: mysql-server: dependency problems - leaving unconfigured
Code:
Preconfiguring packages ...
(Reading database ... 195770 files and directories currently installed.)
Preparing to replace libdbi-perl 1.604-1+b1 (using .../libdbi-perl_1.605-1_i386.deb) ...
Unpacking replacement libdbi-perl ...
Preparing to replace libwrap0-dev 7.6.dbs-13 (using .../libwrap0-dev_7.6.q-15_i386.deb) ...
Unpacking replacement libwrap0-dev ...
Preparing to replace libwrap0 7.6.dbs-13 (using .../libwrap0_7.6.q-15_i386.deb) ...
Unpacking replacement libwrap0 ...
Preparing to replace debconf 1.5.11etch1 (using .../debconf_1.5.22_all.deb) ...
Unpacking replacement debconf ...
Processing triggers for man-db ...
Setting up debconf (1.5.22) ...
Installing new version of config file /etc/debconf.conf ...
Installing new version of config file /etc/bash_completion.d/debconf ...
(Reading database ... 195770 files and directories currently installed.)
Preparing to replace adduser 3.102 (using .../archives/adduser_3.110_all.deb) ...
Unpacking replacement adduser ...
Processing triggers for man-db ...
Setting up libdbi-perl (1.605-1) ...
Setting up libwrap0 (7.6.q-15) ...
Setting up libwrap0-dev (7.6.q-15) ...
Setting up adduser (3.110) ...
Setting up mysql-server-5.0 (5.0.51a-12) ...
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
invoke-rc.d: initscript mysql, action "start" failed.
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
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.0.51a-12) ...
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
invoke-rc.d: initscript mysql, action "start" failed.
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
So try a purge and reinstall:
Code:
mgarsenal:/home/daniel# apt-get purge mysql-server-5.0 mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
mysql-server* mysql-server-5.0*
0 upgraded, 0 newly installed, 2 to remove and 1277 not upgraded.
2 not fully installed or removed.
After this operation, 83.4MB disk space will be freed.
Do you want to continue [Y/n]? Y
(Reading database ... 195760 files and directories currently installed.)
Removing mysql-server ...
Removing mysql-server-5.0 ...
Stopping MySQL database server: mysqld.
Purging configuration files for mysql-server-5.0 ...
Processing triggers for man-db ...
mgarsenal:/home/daniel# apt-get install mysql-server-5.0 mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
tinyca
The following NEW packages will be installed:
mysql-server mysql-server-5.0
0 upgraded, 2 newly installed, 0 to remove and 1277 not upgraded.
Need to get 0B/26.6MB of archives.
After this operation, 83.4MB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously deselected package mysql-server-5.0.
(Reading database ... 193824 files and directories currently installed.)
Unpacking mysql-server-5.0 (from .../mysql-server-5.0_5.0.51a-12_i386.deb) ...
Selecting previously deselected package mysql-server.
Unpacking mysql-server (from .../mysql-server_5.0.51a-12_all.deb) ...
Processing triggers for man-db ...
Setting up mysql-server-5.0 (5.0.51a-12) ...
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
invoke-rc.d: initscript mysql, action "start" failed.
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
E: Sub-process /usr/bin/dpkg returned an error code (1)
Something else might be wrong here like the mysql user not having rights to /.
Check with "ls -la /" the "." and ".." lines and post output.
About adduser, whats fun about it? 3.40 needed and you have 3.102. 102>40 so you're good there.
Mmh, wasn't that. I thought perhaps you had chowned them. Still, the mysql user should be able to write to at least /var/lib/mysql. Check what /var/lib/dpkg/info/mysql-server-5.0.postinst does to see where it could choke.
I'm not familair with the advanced bits of Bash scripting, but I think It starts off with this:
Code:
#!/bin/bash -e
. /usr/share/debconf/confmodule
if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin
# This command can be used as pipe to syslog. With "-s" it also logs to stderr.
ERR_LOGGER="logger -p daemon.err -t mysqld_safe -i"
invoke() {
if [ -x /usr/sbin/invoke-rc.d ]; then
invoke-rc.d mysql $1
else
/etc/init.d/mysql $1
fi
}
Then, later on there's a section that uses it like this
Code:
# Automatically added by dh_installinit
if [ -x "/etc/init.d/mysql" ]; then
update-rc.d mysql defaults 19 21 >/dev/null
if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
invoke-rc.d mysql start || exit $?
else
/etc/init.d/mysql start || exit $?
fi
fi
# End automatically added section
But "/etc/init.d/mysql start" on its own fails, so that's probably where it's failing in the configuration script...
Would it be possible to just switch to mysql 4.1? Would they be able to read the 5.0 data? I'd just try on my own, but I don't want to accidentally break anything.
Have you considered just giving up on your sound, or throwing in a supported sound card and doing an OS upgrade to testing, and ditching the mixed system ?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.