I'd like to think I know what I'm doing in a Unix shell but maybe not.

I made a mistake in a configuration file for MySQL, so I decided to just uninstall it and then reinstall it, so I did:

sudo apt-get --purge remove mysql-server mysql-server-5.0 mysql-client

The files were deleted, so I then tried to install it, but it didn't ask me for a root password or anything else, so I uninstalled it using the above command again and then did

sudo rm -rf /etc/mysql
sudo rm /etc/init.d/mysql
sudo rm -rf /var/lib/mysql*

I then restarted the computer then installed it again:

sudo apt-get install mysql-server mysql-client

It asked for a root password, and everything looked like it would work, until I saw this:

$ sudo apt-get install mysql-server mysql-client
Reading package lists... Done
Building dependency tree
Reading state information... Done The following extra packages will be installed: mysql-server-5.0 Suggested packages: tinyca The following NEW packages will be installed: mysql-client mysql-server mysql-server-5.0 0 upgraded, 3 newly installed, 0 to remove and 1 not upgraded. Need to get 0B/27.4MB of archives. After this operation, 86.7MB of additional disk space will be used. Do you want to continue [Y/n]? y WARNING: The following packages cannot be authenticated! mysql-server-5.0 mysql-client mysql-server Authentication warning overridden. Preconfiguring packages ... Can't exec "/tmp/mysql-server-5.0.config.28101": Permission denied at /usr/share/perl/5.10/IPC/Open3.pm line 168. open2: exec of /tmp/mysql-server-5.0.config.28101 configure failed at /usr/share/perl5/Debconf/ConfModule.pm line 59 mysql-server-5.0 failed to preconfigure, with exit status 255 Selecting previously deselected package mysql-server-5.0. (Reading database ... 160284 files and directories currently installed.) Unpacking mysql-server-5.0 (from .../mysql-server-5.0_5.0.51a-24+lenny5_amd64.deb) ... Selecting previously deselected package mysql-client. Unpacking mysql-client (from .../mysql-client_5.0.51a-24+lenny5_all.deb) ... Selecting previously deselected package mysql-server. Unpacking mysql-server (from .../mysql-server_5.0.51a-24+lenny5_all.deb) ... Processing triggers for man-db ... Setting up mysql-server-5.0 (5.0.51a-24+lenny5) ... Stopping MySQL database server: mysqld. /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 mysql-client (5.0.51a-24+lenny5) ... 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)

Now I can't seem to figure out what to do. I just want to get a clean MySQL installation at this point. I'm running the latest stable release of Debian.

All help is appreciated—thanks!

Edit: I looked at this similar question, which suggests that I uninstall mysql-common, but when I try to do so I see:

The following packages will be REMOVED:
  apache2 apache2-mpm-prefork apache2-utils apache2.2-common git-svn libapache2-mod-php5 libapache2-mod-python libapache2-svn libaprutil1
  libdbd-mysql-perl libdbd-mysql-rubygem libmysql-ruby libmysql-ruby1.8 libmysql-rubygem libmysqlclient15-dev libmysqlclient15off librdf-perl librdf0
  libserf-0-0 libsvn-perl libsvn1 mysql-client-5.0 mysql-common mytop ndn-apache22-php5 ndn-apache22-svn ndn-interpreters ndn-lighttpd
  ndn-netsaint-plugins ndn-perl-modules ndn-php5-cgi ndn-php5-xcache ndn-php53 ndn-php53-suhosin ndn-rubygems php5 php5-mcrypt php5-mysql proftpd
  proftpd-mod-mysql python-django python-mysqldb python-subversion python-svn subversion subversion-tools trac zendoptimizer
0 upgraded, 0 newly installed, 48 to remove and 1 not upgraded.

Eeek! Any suggestions?


dpkg can't execute configure script. This is Linux-VServer problem.

Remount /tmp with exec option.

  • Can you explain how to do that? Thanks. – James Marthenal Feb 7 '11 at 0:40
  • When I try this, I see mount: permission denied—possibly because I'm on a Vserver guest (I ran it as root)? I edited my original question (at the bottom)—does that help at all? – James Marthenal Feb 7 '11 at 0:57
  • I ran it as root (via sudo) – James Marthenal Feb 7 '11 at 0:59
  • My /etc/fstab file is blank (says # This file is not used on vserver guests.). Not sure what you mean. – James Marthenal Feb 7 '11 at 1:31
  • Try "# vnamespace -e XID mount -n -t tmpfs -o remount,exec tmpfs /<vdir>/<guest>/tmp" on host – alvosu Feb 7 '11 at 1:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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