Error: {undef, 日志 [{crypto,hash,XXXXXXXXXXXXX等错误rabbit
出现这种先看环境
正常情况是这样的。输入 crypto:start(). 会出现ok
解决办法重新编译erl 直接重新安装就能解决问题
错误信息
Eshell V11.1.4 (abort with ^G)
1> crypto:start().
=ERROR REPORT==== 28-Jun-2023::10:59:55.045102 ===
Unable to load crypto library. Failed with error:
"load_failed, Failed to load NIF library: '/usr/local/erlang/lib/erlang/lib/crypto-4.8.1/priv/lib/crypto.so: undefined symbol: ENGINE_unregister_STORE'"
OpenSSL might not be installed on this system.
=WARNING REPORT==== 28-Jun-2023::10:59:55.047999 ===
The on_load function for module crypto returned:
{error,{load_failed,"Failed to load NIF library: '/usr/local/erlang/lib/erlang/lib/crypto-4.8.1/priv/lib/crypto.so: undefined symbol: ENGINE_unregister_STORE'"}}
** exception error: undefined function crypto:start/0
安装openssl过程当中,若是直接运行./config是不会产生libcrypto.so动态库的,只有静态库。得从新执行./config shared命令并从新编译make && make install才会出来动态库
以后make clean Erlang的源码,从新编译并安装,以后在erlang中执行crypto:start().,回显ok就好。从新在rabbitmq中添加用户,成功,问题解决。
参考: