Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

nginx installed successfully but cannot start

Tags:

homebrew

nginx

I use homebrew to install nginx. However, when I start nginx, it prompts:

dyld: Library not loaded: /usr/local/lib/libpcre.1.dylib
  Referenced from: /usr/local/bin/nginx
  Reason: Incompatible library version: nginx requires version 4.0.0 or later, but libpcre.1.dylib provides version 2.0.0
Trace/BPT trap: 5

Any ideas?

like image 546
Dong Avatar asked Apr 27 '14 21:04

Dong


2 Answers

I had this same problem, try running this:

brew unlink pcre && brew link pcre

In my case, this was the output: Unlinking /usr/local/Cellar/pcre/8.35... 5 symlinks removed Linking /usr/local/Cellar/pcre/8.35... 133 symlinks created

like image 185
Adolfo Abegg Avatar answered Sep 22 '22 19:09

Adolfo Abegg


Well, I don't know what causes the problem. I checked my pcre, and it was in latest version. Without option I just uninstall it and reinstall it again...Then it works...

like image 44
Dong Avatar answered Sep 26 '22 19:09

Dong