LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 08-18-2008, 05:53 PM   #1
Lokathor
Member
 
Registered: Oct 2005
Location: Boise, ID
Distribution: Debian testing
Posts: 99

Rep: Reputation: 15
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".
 
Old 08-19-2008, 02:18 AM   #2
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
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.

sudo apt-get remove mysql-server-5.0
sudo apt-get remove mysql-server
sudo apt-get install mysql-server-5.0
 
Old 08-19-2008, 08:11 AM   #3
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
Quote:
0 upgraded, 0 newly installed, 0 to remove and 1275 not upgraded.
2 not fully installed or removed.
Did you recently change from Stable to testing, or unstable ?

are you trying to install mysql from a different branch than you are running for the rest of your system ?

Could you post the output of the following so we can see what you are working with ?

uname -a

cat /etc/debian_version

cat/etc/apt/sources.list


mysql-server-5.0.51a-12 would indicate that package is from the testing repository..

Code:
it-etch:~# apt-cache policy mysql-server-5.0
mysql-server-5.0:
  Installed: 5.0.51a-12
  Candidate: 5.0.51a-12
  Version table:
 *** 5.0.51a-12 0
        500 http://ftp.uwsg.indiana.edu lenny/main Packages
 
Old 08-19-2008, 12:54 PM   #4
Lokathor
Member
 
Registered: Oct 2005
Location: Boise, ID
Distribution: Debian testing
Posts: 99

Original Poster
Rep: Reputation: 15
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.

Last edited by Lokathor; 08-19-2008 at 12:55 PM.
 
Old 08-19-2008, 03:00 PM   #5
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
Since you have both stable and testing in your sources list, have you configured apt pinning in your /etc/apt/preferences file ?

http://jaqque.sbih.org/kplug/apt-pinning.html

http://wiki.debian.org/AptPinning

it is really a MUST if you are running a mixed system..

since the error stated an issue with dependencies I would guess that is because of your mixed system..
Quote:
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
I would do a purge of the packages and re-install them.

aptitude purge mysql-server mysql-server-5.0
aptitude install mysql-server-5.0

Last edited by farslayer; 08-19-2008 at 03:05 PM.
 
Old 08-19-2008, 07:25 PM   #6
Lokathor
Member
 
Registered: Oct 2005
Location: Boise, ID
Distribution: Debian testing
Posts: 99

Original Poster
Rep: Reputation: 15
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?
 
Old 08-20-2008, 08:10 PM   #7
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
http://en.wikibooks.org/wiki/MySQL/Administration#Etch

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..

http://packages.debian.org/etch/mysql-server-5.0
http://packages.debian.org/lenny/mysql-server-5.0

Quite frankly your mixed system is what is screwing you.

Last edited by farslayer; 08-20-2008 at 08:13 PM.
 
Old 08-20-2008, 10:59 PM   #8
Lokathor
Member
 
Registered: Oct 2005
Location: Boise, ID
Distribution: Debian testing
Posts: 99

Original Poster
Rep: Reputation: 15
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?
 
Old 08-21-2008, 07:39 AM   #9
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
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. .
 
Old 08-21-2008, 02:28 PM   #10
Lokathor
Member
 
Registered: Oct 2005
Location: Boise, ID
Distribution: Debian testing
Posts: 99

Original Poster
Rep: Reputation: 15
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)
 
Old 08-21-2008, 02:49 PM   #11
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 54
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.
 
Old 08-22-2008, 07:04 PM   #12
Lokathor
Member
 
Registered: Oct 2005
Location: Boise, ID
Distribution: Debian testing
Posts: 99

Original Poster
Rep: Reputation: 15
Oh deary me I forgot about that. I assumed that 3.1? was automatically less than 3.4 when I was posting. My mistake there.

As to the rights of MySql:
Code:
mgarsenal:/home/daniel# su mysql
mgarsenal:/home/daniel# ls -la /
total 124
drwxr-xr-x  22 root   root    4096 2008-04-20 21:15 .
drwxr-xr-x  22 root   root    4096 2008-04-20 21:15 ..
..should mysql be able to write to /? doesn't it keep all the stuff in subdirectores?
 
Old 08-23-2008, 02:56 AM   #13
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 54
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.
 
Old 08-25-2008, 07:56 PM   #14
Lokathor
Member
 
Registered: Oct 2005
Location: Boise, ID
Distribution: Debian testing
Posts: 99

Original Poster
Rep: Reputation: 15
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.
 
Old 08-25-2008, 11:08 PM   #15
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
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 ?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GConf Error: Failed to contact configuration server qwijibow Linux - Software 10 03-25-2013 01:09 PM
Configuration of the Administration Server failed ceci2 Linux - Server 0 07-17-2008 12:53 PM
Fedora Directory Server Admin Configuration Failed. Exutable Linux - Server 0 01-05-2008 12:11 AM
mysql server installation warning: mysql-server-4.1.10a-2.RHEL4.1.i386.rpm: V Buddhike G Linux - Software 3 09-07-2007 06:50 AM
sendmail Server Configuration Failed... Ellops Linux - Networking 1 01-03-2006 02:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 03:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration