(1)错误示例
在yum安装rabbitmq的时候报这个错误。
yum install rabbitmq-server-3.7.4-1.el7.noarch.rpm
Loaded plugins: fastestmirror
Examining rabbitmq-server-3.7.4-1.el7.noarch.rpm: rabbitmq-server-3.7.4-1.el7.noarch
Marking rabbitmq-server-3.7.4-1.el7.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package rabbitmq-server.noarch 0:3.7.4-1.el7 will be installed
--> Processing Dependency: erlang >= 20.3 for package: rabbitmq-server-3.7.4-1.el7.noarch
Loading mirror speeds from cached hostfile
--> Finished Dependency Resolution
Error: Package: rabbitmq-server-3.7.4-1.el7.noarch (/rabbitmq-server-3.7.4-1.el7.noarch)Requires: erlang >= 20.3Available: erlang-R16B-03.4.el7.x86_64 (epel)erlang = R16B-03.18.el7You could try using --skip-broken to work around the problemYou could try running: rpm -Va --nofiles --nodigest
(2)解决方案
1、配置erlang的yum源
vi /etc/yum.repos.d/rabbitmq-erlang.repo
[rabbitmq-erlang]
name=rabbitmq-erlang
baseurl=https://dl.bintray.com/rabbitmq-erlang/rpm/erlang/22/el/7
gpgcheck=1
gpgkey=https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc
repo_gpgcheck=0
enabled=12、删除老包,安装新包
yum remove erlang-erts-R16B-03.18.el7.x86_64
yum install erlang-20.3-1.el7.centos.x86_64.rpm3、清理rpm文件缓存
yum clean all
yum makecache4、使用yum命令查看erlang最新版本
yum list |grep erlang
如果是22,即可继续操作5、安装erlang
yum install erlang.x86_64