Search code examples
linuxcentoserlangerlang-otpkerl

crypto error when installing erlang with kerl in centos


I have been trying to install erlang16 through kerl. I am getting the following error:

 Uncaught error in rebar_core: {'EXIT',
 {undef,
 [{crypto,start,[],[]},

This has been a issue quite a lot of people had before but none of those solutions worked for me.

I did according to this: Unable to install erlang on cent os but failed

If I do, crypto:start(), it does not return me ok. Can someone help. Thanks

Error message:

  1> crypto:start().
  ** exception error: undefined function crypto:start/0
  2> 
  =ERROR REPORT==== 2-Apr-2016::07:28:13 ===
  Unable to load crypto library. Failed with error:
  "load_failed, Failed to load NIF library: 
 '/usr/local/lib/erlang/lib/crypto-       3.0/priv/lib/crypto.so: undefined  symbol: EC_GROUP_new_curve_GF2m'"
  OpenSSL might not be installed on this system.

  =ERROR REPORT==== 2-Apr-2016::07:28:13 ===
  The on_load function for module crypto returned {error,
                                             {load_failed,
                                              "Failed to load NIF library:  '/usr/local/lib/erlang/lib/crypto-3.0/priv/lib/crypto.so: undefined symbol: EC_GROUP_new_curve_GF2m'"}}

Doing this is fine:

 Eshell V5.10.2  (abort with ^G)
 1> application:start(crypto).
 ok

Solution

  • Your Erlang has been built without OpenSSL. Either OpenSSL hasn't been installed or enabled when building Erlang from sources. OpenSSL is required to build the crypto application. See the Erlang installation guide.

    And the simplest way of checking if crypto has been built is simply, as you did, by trying to start crypto.

    1> application:start(crypto).
    ok
    

    Can you try to download a pre-compiled version from Erlang Solutions? Otherwise you will need to find out why kerl isn't picking up OpenSSL (if it's installed). Maybe try to verify configure or compilation logs.