Skip to content

Make and make install file openssl not found OSX #1107

Closed

Description

@philipmoniaga

I tried to make module ejabberd in elixir in OSX EL Captitan following this guide https://blog.process-one.net/ejabberd-joins-the-elixir-revolution/

I have a trouble when make && make install
I got error like these

rm -rf deps/.got
rm -rf deps/.built
/usr/local/Cellar/erlang/18.3/lib/erlang/bin/escript rebar get-deps && :> deps/.got
==> goldrush (get-deps)
==> lager (get-deps)
==> p1_utils (get-deps)
==> cache_tab (get-deps)
==> fast_tls (get-deps)
==> stringprep (get-deps)
==> fast_xml (get-deps)
==> stun (get-deps)
==> esip (get-deps)
==> fast_yaml (get-deps)
==> jiffy (get-deps)
==> p1_oauth2 (get-deps)
==> p1_xmlrpc (get-deps)
==> luerl (get-deps)
==> ezlib (get-deps)
==> elixir (get-deps)
==> rebar_elixir_plugin (get-deps)
==> iconv (get-deps)
==> rel (get-deps)
==> ejabberd (get-deps)
checking for gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking whether make sets $(MAKE)... yes
checking for an ANSI C-conforming const... yes
checking how to run the C preprocessor... cc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for ANSI C header files... (cached) yes
checking for erl... /usr/local/Cellar/erlang/18.3/lib/erlang/erts-7.3/bin/erl
checking for erlc... /usr/local/Cellar/erlang/18.3/lib/erlang/erts-7.3/bin/erlc
checking for SSL_free in -lssl... yes
checking for SHA1_Init in -lcrypto... yes
checking openssl/ssl.h usability... no
checking openssl/ssl.h presence... no
checking for openssl/ssl.h... no
checking openssl/err.h usability... no
checking openssl/err.h presence... no
checking for openssl/err.h... no
checking openssl/sha.h usability... no
checking openssl/sha.h presence... no
checking for openssl/sha.h... no
configure: error: OpenSSL header file "openssl/ssl.h" was not found
ERROR: Command ['get-deps'] failed!
make: *** [deps/.got] Error 1

I have tried

brew link openssl --force 

It still not working
Do you have any solution for this?
Edit

just got solution

Activity

  1. mremond commented on May 9, 2016

    @mremond
    Member

    What was the solution ?
    Had you installed openssl through homebrew ?
    Path set up ?

  2. philipmoniaga commented on May 9, 2016

    @philipmoniaga
    Author

    yes path setup

     export LDFLAGS="-L/usr/local/opt/openssl/lib -L/usr/local/lib -L/usr/local/opt/expat/lib"
     export CFLAGS="-I/usr/local/opt/openssl/include/ -I/usr/local/include -I/usr/local/opt/expat/include"
     export CPPFLAGS="-I/usr/local/opt/openssl/include/ -I/usr/local/include -I/usr/local/opt/expat/include"
    

    it solve my problem

  3. We5ter commented on Aug 26, 2017

    @We5ter

    @philipmoniaga nice!thank you

  4. erkiesken commented on Sep 6, 2017

    @erkiesken

    Just a note to others that after path setup with export run the ./configure again and then make.

  5. scubbo commented on Jan 6, 2018

    @scubbo

    This didn't work for me:

    $ brew install openssl
    Warning: openssl 1.0.2n is already installed
    $ export LDFLAGS="-L/usr/local/opt/openssl/lib -L/usr/local/lib -L/usr/local/opt/expat/lib"
    $ export CFLAGS="-I/usr/local/opt/openssl/include/ -I/usr/local/include -I/usr/local/opt/expat/include"
    $ export CPPFLAGS="-I/usr/local/opt/openssl/include/ -I/usr/local/include -I/usr/local/opt/expat/include"
    $ ./configure
    loading cache ./config.cache
    checking for gcc... gcc
    checking whether the C compiler (gcc -I/usr/local/opt/openssl/include/ -I/usr/local/include -I/usr/local/opt/expat/include -L/usr/local/opt/openssl/lib -L/usr/local/lib -L/usr/local/opt/expat/lib) works... yes
    checking whether the C compiler (gcc -I/usr/local/opt/openssl/include/ -I/usr/local/include -I/usr/local/opt/expat/include -L/usr/local/opt/openssl/lib -L/usr/local/lib -L/usr/local/opt/expat/lib) is a cross-compiler... no
    checking whether we are using GNU C... yes
    checking whether gcc accepts -g... yes
    checking for a BSD compatible install... /usr/bin/install -c
    checking for ranlib... ranlib
    checking how to run the C preprocessor... gcc -E
    checking for X... no
    checking for ANSI C header files... yes
    checking for err.h... yes
    checking for fcntl.h... yes
    checking for sys/ioctl.h... yes
    checking for sys/queue.h... yes
    checking for unistd.h... yes
    checking for libgen.h... yes
    checking for net/if_tun.h... no
    checking for MIN and MAX in sys/param.h... yes
    checking for working const... yes
    checking for size_t... yes
    checking whether struct tm is in sys/time.h or time.h... time.h
    checking for u_int32_t... yes
    checking for u_int64_t... yes
    checking for in_addr_t... yes
    checking whether gcc needs -traditional... no
    checking for 8-bit clean memcmp... yes
    checking return type of signal handlers... void
    checking for strftime... yes
    checking for gethostname... yes
    checking for socket... yes
    checking for strdup... yes
    checking for strstr... yes
    checking for xdr_fhstatus in -lrpcsvc... no
    checking for socket in -lsocket... no
    checking for gethostbyname in -lnsl... no
    checking for dn_expand in -lresolv... yes
    checking for dirname... yes
    checking for strlcpy... yes
    checking for strlcat... yes
    checking for strsep... yes
    checking for MD5Update... no
    checking for warnx... yes
    checking for ether_ntoa... yes
    checking for Berkeley DB with 1.85 compatibility... yes
    checking for libpcap... yes
    checking for libnet... yes
    checking for libnids... yes
    checking whether libnids version is good... yes
    checking for OpenSSL... no
    configure: error: OpenSSL not found
    

    Any ideas?

    EDIT: I successfully installed with this instead.

  6. slzhu commented on Jan 9, 2018

    @slzhu

    another env variable maybe work sometimes, see below
    export LIBRARY_PATH="/usr/local/opt/openssl/lib"

    Here is a detailed explanation

    It depends on what it checking, headers or library, and also when it occur, configure or make. The *FLAGS and LIBRARY_PATH work for different scenes

  7. ludwikbukowski commented on Jun 13, 2018

    @ludwikbukowski

    This works for me

    export LDFLAGS="$LDFLAGS -arch x86_64 -flat_namespace -undefined suppress -L/usr/local/Cellar/openssl/1.0.2n/lib/"
    export C_INCLUDE_PATH=$C_INCLUDE_PATH:/usr/local/Cellar/openssl/1.0.2n/include
    

    where you substitute 1.0.2n with your openssl version

  8. lock commented on Jun 13, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  9. locked as resolved and limited conversation to collaborators on Jun 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions