Hello, I'm trying to upgrade (apt-get update then apt-get upgrade) my debian squeeze server. This always fails with: You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies: mysql-server-5.1 : Depends: mysql-server-core-5.1 (= 5.1.72-2) but 5.1.73-1 is installed E: Unmet dependencies. Try using -f. Using the apt-get -f install fails also. Seems that I have a rogue 5.1.72-2, (Since 5.1.73-1 is already installed) This is what I get from : dpkg-query -l | grep mysql ii libdbd-mysql-perl 4.016-1 Perl5 database interface to the MySQL database iU libmysqlclient-dev 5.1.73-1 MySQL database development files iU libmysqlclient16 5.1.73-1 MySQL database client library iU mysql-client 5.1.73-1 MySQL database client (metapackage depending on the latest version) iU mysql-client-5.1 5.1.73-1 MySQL database client binaries ii mysql-common 5.1.73-1 MySQL database common files, e.g. /etc/mysql/my.cnf iU mysql-server 5.1.73-1 MySQL database server (metapackage depending on the latest version) ii mysql-server-5.1 5.1.72-2 MySQL database server binaries and system database setup iU mysql-server-core-5.1 5.1.73-1 MySQL database server binaries ii php5-mysql 5.3.3-7+squeeze18 MySQL module for php5 Is it safe to just : dpkg --force-all --remove mysql-server-5.1 - Or is there a better way to clean this up without removing and rebuilding? This is a production server. Thanks. Dave
Hi, It is safe to remove the previous package and then installing the new upgraded one, but as it is production server my advice is to please take backup of the databases and configuration file as in case if any thing goes wrong then you will have an option to get it again in working state. You can use Note: never use purge option for removing packages because it affects the configuration file.
Thanks srijan. I was hoping that was going to be the answer. I'll give it a try this weekend. Thanks again... Dave
srijan, Worked perfect!! Thank You.. When I ran 'apt-get remove mysql-server', it returned the same errors as above. However, this time it allowed me to run 'apt-get -f install' with no further problems. Then, apt-get update, apt-get install mysql-server mysql-client - everything went smooth. Finally apt-get upgrade - And everything upgraded as normal. After the backups - took about 3 minutes. I'm still not sure what caused this, but life is now good with this server. Thanks again, Dave
Some times while installing updates or upgrades some dependencies misses or version specific dependency causes these types of issues.