MAC OS x Installation libevent Library install libevent bufferevent_openssl.c:60:10:fatal error: ' openssl/bio.h ' file

Source: Internet
Author: User
Tags install openssl openssl openssl version

Compile libevent (source file in/users/carl/downloads/libevent-2.1.8-stable), execute make command, report

Install libevent bufferevent_openssl.c:60:10:fatal Error: ' openssl/bio.h ' file

The first reaction, the feeling is not OpenSSL version too low.


1. View the OpenSSL version, found that the version is relatively low

$ OpenSSL version
OpenSSL 0.9.8zh 2016

2. Upgrade Spenssl, execute

Brew Install OpenSSL

The output (ignored by the previous output) is as follows:

==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2l.sierra.bottle.tar.gz
######################################################################## 100%
==> Pouring openssl-1.0.2l.sierra.bottle.tar.gz
==> 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's not symlinked into/usr/local,
Because Apple has deprecated use the OpenSSL in favor of it own TLS and crypto libraries.

If you are need to have this software the in your PATH run:
Echo ' Export path= "/usr/local/opt/openssl/bin: $PATH" ' >> ~/.ZSHRC

For compilers to find this software your may need to set:
Ldflags:-l/usr/local/opt/openssl/lib
Cppflags:-i/usr/local/opt/openssl/include

==> Summary
/usr/local/cellar/openssl/1.0.2l:1,709 files, 12.2MB

Output above information to indicate successful installation, installation directory in (/USR/LOCAL/CELLAR/OPENSSL/1.0.2L)

3. Configure the OpenSSL environment variable to point to the newly installed OpenSSL

A. Implementation of Whereis OpenSSL

Output/usr/bin/openssl

B. Back up the original OpenSSL, perform mv/usr/bin/openssl/usr/bin/openssl_old

C. Create OpenSSL command soft connection, execute Ln-s/usr/local/cellar/openssl/1.0.2l/bin/openssl/usr/bin/openssl

D. Re-implementation of OpenSSL version

Output OpenSSL 1.0.2l 2017

Indicates that the upgrade was successful.


After the OpenSSL upgrade succeeds, recompile the libevent, execute the Make name, or report install libevent bufferevent_openssl.c:60:10:fatal error: ' Openssl/bio.h ' File Error,

The next header file in the newly installed OpenSSL directory is then copied to the Libevent source file directory.

Perform Cp-r/usr/local/cellar/openssl/1.0.2l/bin/openssl/include/users/carl/downloads/libevent-2.1.8-stable

Re-make, compile successfully.


Resources:

http://blog.csdn.net/hackcoder/article/details/52442350

http://blog.csdn.net/pz0605/article/details/51954868






Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.