前言:对于centos7.3我使用yum安装不上erlang,才有了这边编译安装erlang的文章。在安装erlang过程中遇到不少坑,最终经过努力把rabbitmq装上。
按照官方的办法安装erlang报错,rpm包也是一样:
Error:Package:erlang-wx-20.0rc1-3.el7.centos.x86_64(erlang-solutions) Requires:libwx_baseu-2.8.so.0()(64bit) Error:Package:erlang-wx-20.0rc1-3.el7.centos.x86_64(erlang-solutions) Requires:libwx_gtk2u_gl-2.8.so.0()(64bit) Error:Package:erlang-wx-20.0rc1-3.el7.centos.x86_64(erlang-solutions) Requires:libwx_gtk2u_xrc-2.8.so.0()(64bit) Error:Package:erlang-wx-20.0rc1-3.el7.centos.x86_64(erlang-solutions) Requires:libwx_gtk2u_html-2.8.so.0()(64bit) Error:Package:erlang-wx-20.0rc1-3.el7.centos.x86_64(erlang-solutions) Requires:libwx_gtk2u_html-2.8.so.0(WXU_2.8)(64bit) Error:Package:erlang-wx-20.0rc1-3.el7.centos.x86_64(erlang-solutions) Requires:libwx_gtk2u_aui-2.8.so.0(WXU_2.8.5)(64bit) Error:Package:erlang-wx-20.0rc1-3.el7.centos.x86_64(erlang-solutions) Requires:libwx_gtk2u_xrc-2.8.so.0(WXU_2.8)(64bit) Error:Package:erlang-wx-20.0rc1-3.el7.centos.x86_64(erlang-solutions) Requires:libwx_baseu_xml-2.8.so.0()(64bit) Error:Package:erlang-wx-20.0rc1-3.el7.centos.x86_64(erlang-solutions) Requires:libwx_gtk2u_adv-2.8.so.0()(64bit) Error:Package:erlang-wx-20.0rc1-3.el7.centos.x86_64(erlang-solutions) Requires:libwx_gtk2u_stc-2.8.so.0(WXU_2.8)(64bit) Error:Package:erlang-wx-20.0rc1-3.el7.centos.x86_64(erlang-solutions) Requires:libwx_gtk2u_core-2.8.so.0()(64bit) Error:Package:erlang-wx-20.0rc1-3.el7.centos.x86_64(erlang-solutions) Requires:libwx_gtk2u_core-2.8.so.0(WXU_2.8)(64bit) Error:Package:erlang-wx-20.0rc1-3.el7.centos.x86_64(erlang-solutions) Requires:libwx_gtk2u_stc-2.8.so.0()(64bit) Error:Package:erlang-wx-20.0rc1-3.el7.centos.x86_64(erlang-solutions) Requires:libwx_gtk2u_aui-2.8.so.0()(64bit) Error:Package:erlang-wx-20.0rc1-3.el7.centos.x86_64(erlang-solutions) Requires:libwx_gtk2u_adv-2.8.so.0(WXU_2.8)(64bit) Error:Package:erlang-wx-20.0rc1-3.el7.centos.x86_64(erlang-solutions) Requires:libwx_gtk2u_gl-2.8.so.0(WXU_2.8)(64bit) Error:Package:erlang-wx-20.0rc1-3.el7.centos.x86_64(erlang-solutions) Requires:libwx_gtk2u_core-2.8.so.0(WXU_2.8.10)(64bit) Error:Package:erlang-wx-20.0rc1-3.el7.centos.x86_64(erlang-solutions) Requires:libwx_gtk2u_aui-2.8.so.0(WXU_2.8)(64bit) Error:Package:erlang-wx-20.0rc1-3.el7.centos.x86_64(erlang-solutions) Requires:libwx_baseu-2.8.so.0(WXU_2.8)(64bit) Youcouldtryusing--skip-brokentoworkaroundtheproblem Youcouldtryrunning:rpm-Va--nofiles--nodigest
以下只是仅仅记录我的安装过程以及问题解决:
1. 安装erlang
#安装依赖环境 yum-yinstallmakegccgcc-c++kernel-develm4ncurses-developenssl-develunixODBC-devel #下载最新Erlang19.0 wgethttp://erlang.org/download/otp_src_19.0.tar.gz #解压 tar-xvzfotp_src_19.0.tar.gz #配置 ./configure--prefix=/usr/local/erlang #检测完毕后提示这个 ********************************************************************* **********************APPLICATIONSINFORMATION******************* ********************************************************************* wx:wxWidgetsnotfound,wxwillNOTbeusable ********************************************************************* ********************************************************************* **********************DOCUMENTATIONINFORMATION****************** ********************************************************************* documentation: fopismissing. UsingfakefoptogenerateplaceholderPDFfiles. ********************************************************************* #解决wxWidgets才能make和makeinstall make&&makeinstall #解决wxWidgets wget-chttps://github.com/wxWidgets/wxWidgets/releases/download/v3.0.3/wxWidgets-3.0.3.tar.bz2 yuminstallbzip2-y bzip2-dwxWidgets-3.0.3.tar.bz2 tar-xvfwxWidgets-3.0.3.tar cdwxWidgets-3.0.3 ./configure #检测wxWidgets出错 configure:error: ThedevelopmentfilesforGTK+werenotfound.ForGTK+2,please ensurethatpkg-configisinthepathandthatgtk+-2.0.pcis installed.ForGTK+1.2pleasecheckthatgtk-configisinthepath,andthattheversionis1.2.3orabove.Alsocheckthatthe librariesreturnedby'pkg-configgtk+-2.0--libs'or'gtk-config --libs'areintheLD_LIBRARY_PATHorequivalent. #解决GTK+,先安装gtk2-devel和binutils yum-yinstallgtk2-develbinutils-devel yuminstalllibSM-devel #可以不安装 yumlistpkgconfig yuminstallgtk+extra #再次./configure出现openGL报错 error:OpenGLlibrariesnotavailable #解决OpenGL yuminstallmesa-libGL-devel yuminstallmesa-libGLU-devel #编译安装 make&&makeinstall
2. 安装 rabbitmq,必须要首先安装erlang
wgethttp://www.rabbitmq.com/releases/rabbitmq-server/v3.6.10/rabbitmq-server-generic-unix-3.6.10.tar.xz xz-drabbitmq-server-generic-unix-3.6.10.tar.xz tar-xvfrabbitmq-server-generic-unix-3.6.10.tar cd./rabbitmq_server-3.6.10 cdsbin/ #修改ERL_DIR路径 vimrabbitmq-defaults 修改为 ERL_DIR=/usr/local/erlang/bin/ 启用web管理界面 ./rabbitmq-pluginsenablerabbitmq_management 启动 ./rabbitmq-server-detached 添加用户 ./rabbitmqctladd_useradmin111111 设置权限 ./rabbitmqctlset_user_tagsadminadministrator 添加访问权限 rabbitmqctlset_permissions-p/admin".*"".*"".*" 浏览器访问 ip:15672
PS:经过使用eralng19.0不支持rabbitmq3.6.4以下
如3.6.3版本rabbitmq的web端管理界面不能查看、管理queues
#2017/07/20更新
后来我发现yum方法可以解决eralng关系,在rabbitmq的github上介绍的完美快捷方案。
我使用的erlang是19.x
添加仓库
vim /etc/yum.repos.d/rabbitmq-erlang.repo
[rabbitmq-erlang] name=rabbitmq-erlang baseurl=https://dl.bintray.com/rabbitmq/rpm/erlang/19/el/7 gpgcheck=1 gpgkey=https://www.rabbitmq.com/rabbitmq-release-signing-key.asc repo_gpgcheck=0 enabled=1
然后执行yum安装erlang
yuminstallerlang-y
然后再添安装最新版rabbitmq
yuminstallrabbitmq-server-y
如果不是你所要的版本,去官网下载最新rpm包
wget-chttps://bintray.com/rabbitmq/rabbitmq-server-rpm/download_file?file_path=rabbitmq-server-3.6.10-1.el7.noarch.rpm yuminstallrabbitmq-server-3.6.10-1.el7.noarch.rpm