Nginx broken after upgrade to osx yosemite - macos

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?

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

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

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

Related

Fixing homebrew on Mac OSX 10.13.2

Just wondering if anyone can help fix homebrew for me. It was working a minute ago...
I am trying to install new packages using Homebrew on my 2 Macbooks. Both are running High Sierra, which I suspect might be the problem due to Apple borking root permissions...
Anyway, my issue goes a little something like this:
❯❯❯ brew install git
Error: git 2.14.2 is already installed
To upgrade to 2.15.1, run `brew upgrade git`
Okay. Lets upgrade Git.
❯❯❯ brew upgrade git
==> Upgrading 1 outdated package, with result:
git 2.15.1
==> Upgrading git
==> Downloading https://homebrew.bintray.com/bottles/git-2.15.1.high_sierra.bottle.tar.gz
Error: curl is not executable
Warning: Bottle installation failed: building from source.
==> Downloading https://www.kernel.org/pub/software/scm/git/git-2.15.1.tar.xz
Error: curl is not executable
Strange. I use curl daily...
❯❯❯ curl
curl: try 'curl --help' or 'curl --manual' for more information
❯❯❯ which curl
/usr/bin/curl
❯❯❯ ls -al /usr/bin/curl
-rwxr-xr-x 1 root wheel 185104 Dec 1 15:45 /usr/bin/curl
So it exists and looks executable. Maybe the homebrew links got messed up? I will re-install curl using brew
❯❯❯ brew install curl
==> Downloading https://homebrew.bintray.com/bottles/curl-7.57.0.high_sierra.bottle.tar.gz
Error: curl is not executable
Warning: Bottle installation failed: building from source.
==> Downloading https://curl.haxx.se/download/curl-7.57.0.tar.bz2
Error: curl is not executable
So basically homebrew is not working for me. On TWO different machines running the same Mac OS version 10.13.2
NOTE: This is not limited in any way to installing git. The problem started trying to install minikube.
UPDATE
I checked my setup via brew config and noticed that although I DO have curl installed, homebrew does not see it: Curl: N/A
HOMEBREW_VERSION: 1.4.1
ORIGIN: https://github.com/Homebrew/brew
HEAD: b4d43e950fd45c24e48d6ebfd3013357abcd21a9
Last commit: 10 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 809322678d0fb7ab034348f86f0e452eff203b49
Core tap last commit: 73 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_VISUAL: nano
CPU: octa-core 64-bit haswell
Homebrew Ruby: 2.3.3 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/bin/ruby
Clang: 9.0 build 900
Git: 2.14.3 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: N/A
Perl: /usr/bin/perl
Python: /usr/local/opt/python/libexec/bin/python => /usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Java: 1.8.0_31
macOS: 10.13.2-x86_64
Xcode: 9.2
CLT: 9.2.0.0.1.1510905681
X11: 2.7.9 => /opt/X11
The OS already has curl installed, but homebrew does not see it.
I cannot install curl using homebrew (see above).
So now the problem becomes "How do I fix homebrew so it sees curl"?
I was running into the same issue yesterday. For me it was caused by a file called curl left over from a botched command in the same directory where I was running brew. Deleting that file resolved the issue.
I had same problem and I have no idea how but I fixed it. First I uninstalled any brew-version of curl that was installed. Then, when that didn't work, I navigated to \bin\usr\curl to make sure it was still there. I then ran curl in terminal (just literally `curl' and then which curl to make sure it was using right one), and then reran brew and it seemed to work. I think what happens is that for some reason in new Mac files sometimes don't appear locally until you open them for the first time when using iCloud. Its happened before with other dependencies, where I had to navigate to file and physically open it before it would be locally downloaded and be recognized as a dependency. Not sure if Mac does same thing with curl. If so, quite dumb.
I had this same issue, also on Mac OS High Sierra. I ended up running brew uninstall curl. This gave me an error, but then when I installed Homebrew curl again, it worked and I could install git and others.
if you have tried everything and nothing helps, if you're facing permissions issues - try to re-install the Homebrew:
uninstall:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
and then install it again:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
helped in my case

MacOS cannot run nginx

When I run nginx on my MacOS.
➜ nginx nginx
dyld: Library not loaded: /usr/local/opt/openssl#1.1/lib/libssl.1.1.dylib
Referenced from: /usr/local/bin/nginx
Reason: image not found
[1] 10170 abort nginx
Please start by installing HomeBrew http://brew.sh/. It is a package manager for MacOS that allows to easily install various Unix applications.
MacOS will prompt you to first install Xcode Command Line Tools (unless you have them already).
After installation, the following command, if necessary, will tell you how to complete the installation:
brew doctor
//Then updates all packages with:
brew update
brew upgrade
//Then Install Nginx
brew install nginx
// Then automatically launch Nginx at startup with:
sudo cp /usr/local/opt/nginx/*.plist /Library/LaunchDaemons
sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.nginx.plist
Good luck!
I had that problem for a bit, but when I ran
brew uninstall nginx
and then
brew install nginx
It reinstalled properly and I was able to run it without getting that error.

How to install CouchDB on Mac OS X? (Docs not helping)

I tried installing CouchDB 1.6 via Homebrew per the instructions on the official CouchDB docs at docs.couchdb.org, but I am having no success. First, I tried the native application and that worked but apparently that version does not support CORS. It has been a frustrating experience, so any help will be greatly appreciated.
Here is the error that I am getting when trying to ping CouchDB:
curl: (7) Failed to connect to 127.0.0.1 port 5984: Connection refused
I followed the installation guide here: http://docs.couchdb.org/en/1.6.1/install/mac.html
These were the terminal commands I used:
open /Applications/Installers/Xcode\ Tools/XcodeTools.mpkg
--> File not found (this step is listed as optional, so I moved on)
brew update
brew doctor
brew install autoconf
brew install autoconf-archive
brew install automake
brew install libtool
brew install erlang
brew install icu4c
brew install spidermonkey
brew install curl
brew link icu4c
--> Requires --force option which can cause installations to fail
(I did not do the --force option)
brew link erlang
brew install couchdb
--> To test CouchDB run: curl http://127.0.0.1:5984/
curl http://127.0.0.1:5984/
--> curl: (7) Failed to connect to 127.0.0.1 port 5984: Connection refused
Mac Info:
MacBook Pro (Retina, 13-inch, Late 2013)
OS X Yosemite
Version 10.10.3
My guess is that it is installed, but just not running. Can you try running couchdb -d?
That should start it up in the background, if you need it to run on every startup, you can continue following the instructions for "Running as a Daemon"

Unable to install postgresql with Homebrew in Yosemite

I'm trying to install postgresql via homebrew on Yosemite and I'm getting the following error:
checking for libperl... no
configure: error: libperl library is required for Perl
I've tried to see about manually installing libperl but I haven't had any success. I have command line tools and xcode installed. Also brew doctor says everything is fine. Thank you in advance for the help.
You can use brew install postgresql --no-perl as temporary solution.
Check the status of other formulas here

Lion (10.7) Not supporting Convert(1). Dylib error

When trying to use convert(1), I get the following error:
dyld: Library not loaded: /System/Library/Frameworks/OpenCL.framework/Versions/A/Libraries/libclparser.dylib
Referenced from: /usr/local/bin/convert
Reason: image not found
Trace/BPT trap: 5
Any idea how I could fix it ?
I was getting this error as well–with a homebrew install of ImageMagick. Along the same lines as Pascal, I fixed it with
Install XCode 4.1 (from the App Store)
In Xcode, go to Xcode > Preferences... > Downloads tab > click Install next to Command Line Tools
Uninstall ImageMagick with brew uninstall imagemagick
Update homebrew with brew update
Install latest homebrew with brew install imagemagick
Run brew doctor and delete any of the *.la and *.a files listed if step 4 fails on make install
I got the same error and what solved the problem for me was:
Install the latest XCode version from the Mac Appstore
Install ImageMagick using Macports (sudo port install imagemagick)
Both steps took a while, but in the end ImageMagick worked fine again.
I installed xcode but had some issue with macports. Bummer!
I copied the libclparser.dylib file over from an old backup of 10.6, changed the permissions to match the other files in that folder and it worked!
Also see here:
https://stackoverflow.com/questions/6674666/installing-imagemagick-leads-to-weird-error-involving-opencl
Edit:
I found this, which may be useful: http://cactuslab.com/imagemagick/
Also, the file is here: http://www.workdreamer.com/uploads/libclparser.dylib
Reinstalling it even with brew instead of macports didn't work for me. Copying it did.
Try the following command:
brew doctor
to diagnose the common problems.
One of it could be removing DYLD_FALLBACK_LIBRARY_PATH variable from your ~/.profile
Or you have to re-install libtool by:
brew reinstall libtool --universal && brew unlink libtool && brew link libtool

Resources