mac brew install nginx遇到的坑

时间:2022-11-24 08:46:43

默认使用 brew install nginx 出现了一下的错误:

p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff }
p.p2 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff; min-height: 13.0px }
span.s1 { }
span.s2 { color: #34bc26 }
span.s3 { color: #5230e1 }
span.s4 { color: #c33720 }
span.s5 { color: #afad24 }
span.s6 { font: 11.0px "Apple Color Emoji" }

localhost:testdj newstart$ brew install nginx

==> Installing dependencies for nginx: openssl, pare

==> Installing nginx dependency: openssl

==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2n.high_sierra.

######################################################################## 100.0%

==> Pouring openssl-1.0.2n.high_sierra.bottle.tar.gz

Error: Failed to create /usr/local/opt/openssl

Things that depend on openssl will probably not build.

Could not symlink .

/usr/local/opt is not writable.

Warning: The post-install step did not complete successfully

You can try again using `brew postinstall openssl`

==> Caveats

A CA file has been bootstrapped using certificates from the SystemRoots

keychain. To add additional certificates (e.g. the certificates added in

the System keychain), place .pem files in

/usr/local/etc/openssl/certs

and run

/usr/local/opt/openssl/bin/c_rehash

This formula is keg-only, which means it was not symlinked into /usr/local,

because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.

If you need to have this software first in your PATH run:

echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile

For compilers to find this software you may need to set:

LDFLAGS:  -L/usr/local/opt/openssl/lib

CPPFLAGS: -I/usr/local/opt/openssl/include

==> Summary