Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm having libmcrypt troubles on my Mac, version 10.6.8, php version 5.3.8. I want to enable libmcrypt but I don't appear to have mcrypt!

I've tried following directions to install libmcrypt on a few different websites:

http://michaelgracie.com/2009/09/23/plugging-mcrypt-into-php-on-mac-os-x-snow-leopard-10-6-1/ http://www.glenscott.co.uk/blog/2011/02/03/install-mcrypt-php-extension-on-os-x-snow-leopard/ (which says I need to have php 5.3.4 for it to work) and possibly others.

I get hung up at the same point on both sets of instructions: 1) I download libmcrypt2.5.8 & uncompress it 2) I cd to the libmcrypt directory 3) I type "./configure" (with the flags the different sets of instructions suggest) 4) and ./configure does not seem to work correctly for me because when I type "make" I get the following message "make: * No targets. Stop."

The tail of the ./configure output is:

configure: creating ./config.status
config.status: creating Makefile
sed: 14: "/^[\t ]*VPATH[\t ]*=/{\ns/ ...": bad flag in substitute command: 'S'
config.status: creating libmcrypt.spec
sed: 14: "/^[\t ]*VPATH[\t ]*=/{\ns/ ...": bad flag in substitute command: 'S'
config.status: creating lib/Makefile
sed: 14: "/^[\t ]*VPATH[\t ]*=/{\ns/ ...": bad flag in substitute command: 'S'
config.status: creating doc/Makefile
sed: 14: "/^[\t ]*VPATH[\t ]*=/{\ns/ ...": bad flag in substitute command: 'S'
config.status: creating src/Makefile
sed: 14: "/^[\t ]*VPATH[\t ]*=/{\ns/ ...": bad flag in substitute command: 'S'
config.status: creating include/mutils/mcrypt.h
sed: 14: "/^[\t ]*VPATH[\t ]*=/{\ns/ ...": bad flag in substitute command: 'S'
config.status: creating include/Makefile
sed: 14: "/^[\t ]*VPATH[\t ]*=/{\ns/ ...": bad flag in substitute command: 'S'
config.status: creating modules/Makefile
sed: 14: "/^[\t ]*VPATH[\t ]*=/{\ns/ ...": bad flag in substitute command: 'S'
config.status: creating modules/modes/Makefile
sed: 14: "/^[\t ]*VPATH[\t ]*=/{\ns/ ...": bad flag in substitute command: 'S'
config.status: creating modules/algorithms/Makefile
sed: 14: "/^[\t ]*VPATH[\t ]*=/{\ns/ ...": bad flag in substitute command: 'S'
config.status: creating lib/libmcrypt-config
sed: 14: "/^[\t ]*VPATH[\t ]*=/{\ns/ ...": bad flag in substitute command: 'S'
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing default-1 commands

After searching the web, I came to a StackExchange question where someone was checking their mcrypt version. Make mcrypt available to PHP 5.3 on Mac OS X 10.6

When I type "which mcrypt" I get nothing. I searched to find out how I get mcrypt, but everything refers to libmcrypt.

(incase this is important, I usually use macports, but switched to homebrew temporarily, and then switched back to macports.)

Does anyone have a suggestion of what I need to do to get mcrypt/libemcrypt installed & working correctly?

Thanks, Dan

(Since writing this question, I installed mcrypt using MacPorts, & still have the same problem installing libmcrypt)

-------Additional information added after emcconville's reply:-------- (I added some out put from the attempt to configure libmcrypt in the description above)

I want to make sure I understand correctly... Are you (emcconville) saying to install libmhash or mhash? The instructions on the sourceforge website are for mhash. I tried to do this just now, and failed, using the "./configure, make, & sudo make install" series of commands & have a problem similar to the one I received when I tried to install libbmcrypt. The make file is not generated; typing "make" at the command line results in "make: * No targets. Stop."

The last lines of output generated from the configure command are:

configure: creating ./config.status
config.status: creating Makefile
sed: 15: "/^[\t ]*VPATH[\t ]*=/{\ns/ ...": bad flag in substitute command: 'D'
config.status: creating mhash.spec
sed: 15: "/^[\t ]*VPATH[\t ]*=/{\ns/ ...": bad flag in substitute command: 'D'
config.status: creating include/Makefile
sed: 15: "/^[\t ]*VPATH[\t ]*=/{\ns/ ...": bad flag in substitute command: 'D'
config.status: creating doc/Makefile
sed: 15: "/^[\t ]*VPATH[\t ]*=/{\ns/ ...": bad flag in substitute command: 'D'
config.status: creating src/Makefile
sed: 15: "/^[\t ]*VPATH[\t ]*=/{\ns/ ...": bad flag in substitute command: 'D'
config.status: creating lib/Makefile
sed: 15: "/^[\t ]*VPATH[\t ]*=/{\ns/ ...": bad flag in substitute command: 'D'
config.status: creating include/mutils/mhash_config.h
config.status: include/mutils/mhash_config.h is unchanged
config.status: executing depfiles commands

(Does it matter that I have already have libmhash files in my /opt/local/lib directory?)

When I use MacPorts to install mhash I get the following output: ---> Cleaning mhash ---> Scanning binaries for linking errors: 100.0% ---> No broken files found.

share|improve this question
    
libmcrypt has a dependency of libmhash. Download & install libmhash from mhash.sf.net. They all follow the same ./configure, make, & sudo make install directions. –  emcconville Aug 28 '12 at 19:31
    
Wow, thanks for the quick reply! –  user1429981 Aug 28 '12 at 20:32
    
When I try to configure libmhash, I a similar to the one when I tried to install libmcrypt. No make file is generated. I do already have some libmhash files in my /opt/local/lib directory: libmhash.2.0.1.dylib libmhash.2.dylib libmhash.a libmhash.dylib libmhash.la –  user1429981 Aug 28 '12 at 20:57
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.