101

Apache wont start and it throws an error:

Starting Apache failed screenshot

OR Apache couldn't be started. Please check the log file for more information.

dyld: Symbol not found: _iconv Referenced from: /usr/lib/libmecabra.dylib Expected in: /Applications/MAMP/Library/lib/libiconv.2.dylib in /usr/lib/libmecabra.dylib /Applications/MAMP/Library/bin/apachectl: line 80: 2799 Trace/BPT trap: 5 $HTTPD "$

This is the same for multiple ports. The reccomended MAMP ports AND the regular apache ports.

MySQL starts perfectly fine.

Any suggestions?

gmo
  • 8,860
  • 3
  • 40
  • 51
Toby Mellor
  • 8,093
  • 8
  • 34
  • 58
  • Are you running Mavericks? I just got the same error and I just upgraded Java and Mavericks... I'll let you know if I come up with a solution. – pjhagel Aug 08 '14 at 21:18
  • possible duplicate of [MAMP Pro 3.05 on Mavericks updated to Yosemite - Apache does not start](http://stackoverflow.com/questions/25139599/mamp-pro-3-05-on-mavericks-updated-to-yosemite-apache-does-not-start) – Gabe Oct 02 '14 at 19:06

2 Answers2

395

I updated to the latest version of yosemite last night.

You apparently have to go to your MAMP folder in Applications. Go to bin -> apache2 -> bin.

Then rename the file from envvars to _envvars.

I also came across another problem of it not working correctly. Make sure the ports are Apache defaults, NOT MAMP defaults (port 80 etc). If it works straight away, this should not apply to you.

Cristian Ciupitu
  • 20,270
  • 7
  • 50
  • 76
Toby Mellor
  • 8,093
  • 8
  • 34
  • 58
  • 7
    Thank you! Worked! For others, clear solution: cd /Applications/MAMP/Library/bin && sudo mv envvars _envvars – Rozkalns Aug 20 '14 at 20:03
  • Just updated to mavericks too and had the same problem. You sir, is awesome. – luizfonseca Aug 22 '14 at 14:45
  • 1
    If you're running Yosemite and this answer doesn't work for you, do this first : backup your MAMP directory, remove MAMP and MAMP Pro, reinstall 3.0.5, perform the trick in the answer, then restore your htdocs, confs and db directories from your backup. Apache will then start. – jorisw Oct 17 '14 at 11:26
  • 1
    Just wondering what the reason is for this change to envvars? It has to do with Yosemite environment declarations? – DrewT Nov 06 '14 at 17:37
  • Just a note apache port works with me on **port 80**. The default MAMP seems to be 8888 which doesn't work in my case. – elliotrock Nov 11 '14 at 08:49
  • @Toby After applying your fix mySQL is getting a socket error and can't find mysql **#2002 - Can't connect to local MySQL server through socket** ? Any ideas? – elliotrock Nov 11 '14 at 09:13
  • I was using Mamp 2 and could not get Apache to start, then updated to Mamp 3 and everything worked fine. – Shlomo Nov 24 '14 at 13:32
  • 2
    @Dano check the filename spelling, there are typos in the command. Should be __cd /Applications/MAMP/Library/bin && sudo mv envvars _envvars__. – Brad G Dec 01 '14 at 14:48
2

Installing the latest release of MAMP 3 Version 3.0.7.3 in my case seems to solve this issue.

rii
  • 1,578
  • 1
  • 17
  • 22
  • Im facing the same issue now in OS X El Captain , i have upgraded to 3.0.7.3 but still cant run apache. Can anyone hel me . thanks – Delavega Oct 05 '15 at 04:47
  • 1
    @Delavega, if you still have this problem, see http://stackoverflow.com/a/34425292/2913356 – Tomasz Nguyen Jan 24 '16 at 23:32