Description:
When installing a package from the command line on top of a previous 5.1 or 5.5 installation,
you got this message either with the installer and command line :
MySQL <version> for Mac OS X can't be installed in this disk.
A newer version of this software alrady exists on this disk
How to repeat:
1. install latest 5.5 version using a dmg installation (or pkg)
mysql-5.5.14-osx10.6-x86_64.pkg
2. download and mount the latest dmg image :
mysql-5.1.58-osx10.6-x86_64.pkg
3. run this command :
sudo installer -verbose -package /Volumes/mysql-5.1.58-osx10.6-x86_64/mysql-5.1.58-osx10.6-x86_64.pkg -target /Volumes/<Your HDD name>
Command output :
installer: Cannot install on volume / because it is disabled
installer: A newer version of this software already exists on this disk
Please note the above message (last line) is localized : in French, it would be :
installer: Une version plus récente de ce logiciel est déjà présente sur ce disque.
Installer version :
installer -vers
Command line installer (installer) v. 1.5.0
Copyright (c) 1999-2006 Apple Computer, Inc.
Suggested fix:
The problem comes from files left in
/var/db/receipts/com.mysql*
Workaround :
remove this files :
sudo rm -rf /var/db/receipts/com.mysql*
Apart from /usr/local/mysql-5.1.58-osx10.6-x86_64, the installer writes files in these directories :
/Library/Receipts/InstallHistory.plist
Fix :
fix this installer problem