postfix can not start
Ryan Schmidt
ryandesign at macports.org
Tue Apr 21 06:46:00 PDT 2009
On Apr 20, 2009, at 09:43, Scott Haneda wrote:
> On Apr 20, 2009, at 7:25 AM, Daniel J. Luke wrote:
>
>>>> $sudo /opt/local/sbin/postfix start
>>>> dyld: Library not loaded: /opt/local/lib/mysql5/mysql/
>>>> libmysqlclient.16.dylib
>>>> Referenced from: /opt/local/sbin/postfix
>>>> Reason: image not found
>>>> Trace/BPT trap
>>
>> You upgrade mysql and it removed a library that postfix depended
>> on. (/opt/local/lib/mysql5/mysql/libmysqlclient.16.dylib).
>>
>> When you removed and re-installed postfix, it found the newer
>> mysql library and worked again.
>>
>> One way of dealing with this sort of thing would be to have a
>> staging server where you can test upgrades before you push them to
>> your production machine (or if you have a cluster, you might be
>> able to remove one machine from the cluster, test the upgrade on
>> it, and move it back into the cluster once you are confident that
>> the upgrade worked)
>
> Why did mysql allow it?
mysql didn't allow or not allow anything. Sometimes software is
upgraded in ways that require other software to be rebuilt (an ABI-
incompatible change). In this case, the library version number is
increased, and other software must be rebuilt against the new
library. MacPorts has no mechanism to automatically rebuild software
that needs it, so you must do so manually. It is a Google Summer of
Code project this year to add to MacPorts the mechanism to do this
automatically if needed.
In your specific case, postfix was built to use libmysqlclient.
16.dylib but that version of that library is no longer on your
system. Did you perhaps switch from using the mysql5-devel port
(which provides MySQL 5.1.x and libmysqlclient.16.dylib) to using the
mysql5 port (which provides MySQL 5.0.x and libmysqlclient.15.dylib)?
If you switch between MySQL 5.0.x and 5.1.x you must rebuild any
ports that depend on MySQL, because of the differing library version
numbers.
More information about the macports-users
mailing list