36

Nginx was working fine on Mavericks, and now after I upgraded to Yosemite its displaying nginx command not found , I tried to install nginx with brew install nginx and it displays an error

Error: You must brew link pcre before nginx can be installed

And brew link pcre displays

Linking /usr/local/Cellar/pcre/8.35... Error: No such file or directory - /usr/local/Cellar/pcre/8.34/share/doc/pcre

Its trying to link 8.34. I reinstalled still its same, How do i solve it?

Arun
  • 1,528
  • 3
  • 19
  • 34

3 Answers3

100

I had the same problem, that is, after upgrading from Mavericks to Yosemite I got the following error: nginx: [emerg] mkdir() "/usr/local/var/run/nginx/client_body_temp" failed (2: No such file or directory)

All I needed to do to solve this issue was to create the folder:

mkdir -p /usr/local/var/run/nginx/client_body_temp
izolate
  • 1,590
  • 4
  • 22
  • 35
Dwight Rodriques
  • 1,382
  • 1
  • 12
  • 11
28

I ran into the same issue. My solution was simply upgrading the package: brew update ; brew upgrade nginx

user4237331
  • 281
  • 2
  • 2
7

Had the same issue, re-installing nginx via homebrew fix it for me:

brew reinstall nginx