前言:对于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) You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest
以下只是仅仅记录我的安装过程以及问题解决:
1. 安装erlang
#安装依赖环境 yum -y install make gcc gcc-c++ kernel-devel m4 ncurses-devel openssl-devel unixODBC-devel #下载最新 Erlang 19.0 wget http://erlang.org/download/otp_src_19.0.tar.gz #解压 tar -xvzf otp_src_19.0.tar.gz #配置 ./configure --prefix=/usr/local/erlang #检测完毕后提示这个 ********************************************************************* ********************** APPLICATIONS INFORMATION ******************* ********************************************************************* wx : wxWidgets not found, wx will NOT be usable ********************************************************************* ********************************************************************* ********************** DOCUMENTATION INFORMATION ****************** ********************************************************************* documentation : fop is missing. Using fakefop to generate placeholder PDF files. ********************************************************************* #解决wxWidgets才能make和make install make && make install #解决 wxWidgets wget -c https://github.com/wxWidgets/wxWidgets/releases/download/v3.0.3/wxWidgets-3.0.3.tar.bz2 yum install bzip2 -y bzip2 -d wxWidgets-3.0.3.tar.bz2 tar -xvf wxWidgets-3.0.3.tar cd wxWidgets-3.0.3 ./configure #检测wxWidgets出错 configure: error: The development files for GTK+ were not found. For GTK+ 2, please ensure that pkg-config is in the path and that gtk+-2.0.pc is installed. For GTK+ 1.2 please check that gtk-config is in the path, and that the version is 1.2.3 or above. Also check that the libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config --libs' are in the LD_LIBRARY_PATH or equivalent. #解决GTK+,先安装gtk2-devel和binutils yum -y install gtk2-devel binutils-devel yum install libSM-devel #可以不安装 yum list pkgconfig yum install gtk+extra #再次./configure出现openGL报错 error: OpenGL libraries not available #解决OpenGL yum install mesa-libGL-devel yum install mesa-libGLU-devel #编译安装 make && make install
2. 安装 rabbitmq,必须要首先安装erlang
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.10/rabbitmq-server-generic-unix-3.6.10.tar.xz xz -d rabbitmq-server-generic-unix-3.6.10.tar.xz tar -xvf rabbitmq-server-generic-unix-3.6.10.tar cd ./rabbitmq_server-3.6.10 cd sbin/ #修改ERL_DIR路径 vim rabbitmq-defaults 修改为 ERL_DIR=/usr/local/erlang/bin/ 启用web管理界面 ./rabbitmq-plugins enable rabbitmq_management 启动 ./rabbitmq-server -detached 添加用户 ./rabbitmqctl add_user admin 111111 设置权限 ./rabbitmqctl set_user_tags admin administrator 添加访问权限 rabbitmqctl set_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
yum install erlang -y
然后再添安装最新版rabbitmq
yum install rabbitmq-server -y
如果不是你所要的版本,去官网下载最新rpm包
wget -c https://bintray.com/rabbitmq/rabbitmq-server-rpm/download_file?file_path=rabbitmq-server-3.6.10-1.el7.noarch.rpm yum install rabbitmq-server-3.6.10-1.el7.noarch.rpm
转载于:https://blog.51cto.com/yanconggod/1933009