一. 啟動rabbitmq 提示異常
Unable to load crypto library. Failed with error:
"load_failed, Failed to load NIF library: '/usr/local/erlang/lib/crypto/priv/lib/x86_64-unknown-linux-gnu/crypto.so: undefined symbol: EVP_chacha20'"
OpenSSL might not be installed on this system.
<0.185.0> CRASH REPORT Process <0.185.0> with 0 neighbours exited with reason: call to undefined function crypto:strong_rand_bytes(128) in application_master:init/4 line 138
環境:centos7.5
openssl版本:openssl-1.1.1g
erlang版本:otp_src_22.3.tar.gz
rabbitmq版本: rabbitmq-server-3.8.3.tar.xz
根據提示,應該是說erlang里有某一個方法使用了 openssl的內容,但是當前openssl中沒有這個內容
解決方式:
1. 進入openssl所在文件夾 /usr/local/openssl-1.1.1g (根據實際安裝情況來)
輸入: ./config shared
2. 在當前目錄執行 make && make install 重新打包安裝
3. 切換到 erlang 所在目錄 /usr/local/erlang (根據實際安裝情況來)
4. 輸入 make clean 清除在erlang目錄下上次的make命令所產生的object文件(后綴為“.o”的文件)及可執行文件。
5. 重新編譯安裝 erlang ,輸入: make && make install
6. 輸入 erl, 驗證 crypto:start(). 是否可以執行
內容來自於:安裝rabbitmq過程中的麻煩 - 嘟嘟老鼠窩 - OSCHINA - 中文開源技術交流社區