Macos Yosemite with ulimit unlimited

Posted on


How do I run apache2 on Macos Yosemite. I am getting 2 errors:

Error #1

+ ulimit -S -n unlimited
/Applications/MAMP/Library/bin/apachectl: line 70: ulimit: open files: cannot modify limit: Invalid argument

Error #2

dyld: Symbol not found: _iconv


The bash ulimit on Yosemite returns “ulimited” for the command “ulimit -H -n” this value cannot be set.

Check that a value for max files is set in /etc/sysctl.conf. I have (from postgres):


With a default (ulimit -n) of 2560. See for more details.

Change apachectl from:

ULIMIT_MAX_FILES="ulimit -S -n `ulimit -H -n`


ULIMIT_MAX_FILES="ulimit -S -n `sysctl -A | grep kern.maxfiles: | awk '{ print $2}' `"

Problem 2: Rename envvars (MAMP specific)

cd /Applications/MAMP/Library/bin
mv envvars _envvars

As per:

Leave a Reply

Your email address will not be published. Required fields are marked *