Solution to "Unable to load mcrypt.so"

General discussion forum for the Zend Server
Post Reply
User avatar
clarkphp
Zend Global Services
Posts: 34
Joined: Sat Jun 30, 2012 9:59 pm
Location: United States
Contact:

Solution to "Unable to load mcrypt.so"

Post by clarkphp » Mon Oct 01, 2012 6:04 pm

If you are seeing the following error running PHP CLI under OSX with Zend Server, especially after an operating system upgrade:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/mcrypt.so' - dlopen(/usr/local/zend/lib/php_extensions/mcrypt.so, 9): Library not loaded: /usr/lib/libltdl.3.dylib
then all you need to do the fix the problem is create a symlink to the .dylib file as follows:

Code: Select all

sudo ln -s /usr/local/zend/lib/libltdl.3.dylib /usr/lib/libltdl.3.dylib
Zend includes both the .so and .dylib files, you just need to get OSX to see the .dylib file by creating the symlink.

Post Reply