Today on the Mac OS compiled installation Nginx, error: Ld:symbol (s) not found for architecture x86_64, after some tossing and finding, because Nginx relies on the OpenSSL library, view OpenSSL. Config file found that the problem should be Openssl/config script to your system is 64 bit, but will be based on $kernel_bits to determine whether to turn on x86_64 compilation, default does not open, he will give you 5 seconds to confirm whether to stop compiling, manually set x86_ 64 compile, so default you generate the OpenSSL library file is 32 bits, and finally statically linked to nginx error. There seems to be no good way to pass the x86_64 parameters to the OpenSSL configuration file (Openssl/config Guess OS architecture, set whether the compiled parameter is 32-bit or 64-bit, default is 32 bit, and then call openssl/ Configure generate Makefile),
The solution is:
Run the Nginx source directory first
$./configure
And then in the OBJS, open the makefile,
Found:./config--prefix=xxx.openssl no-shared (Note: XXX is an existing OpenSSL source path)
Change the./config of the paragraph to./configure DARWIN64-X86_64-CC Other later parameters unchanged, save
And then make is compiled and passed.
Nginx Install (Mac OS) error Ld:symbol (s) not found for architecture x86_64