我想安装 Logstash 和其他程序,但是当我尝试时:
# yum install libevent-devel
我收到以下错误:
Transaction Check Error:
file /usr/bin/event_rpcgen.py from install of libevent-devel-2.0.12-1.rhel6.i686 conflicts with file from package compat-libevent14-1.4.13-1.rhel6.i686
file /usr/lib/libevent_core.a from install of libevent-devel-2.0.12-1.rhel6.i686 conflicts with file from package compat-libevent14-1.4.13-1.rhel6.i686
file /usr/lib/libevent_core.so from install of libevent-devel-2.0.12-1.rhel6.i686 conflicts with file from package compat-libevent14-1.4.13-1.rhel6.i686
file /usr/lib/libevent_extra.a from install of libevent-devel-2.0.12-1.rhel6.i686 conflicts with file from package compat-libevent14-1.4.13-1.rhel6.i686
file /usr/lib/libevent_extra.so from install of libevent-devel-2.0.12-1.rhel6.i686 conflicts with file from package compat-libevent14-1.4.13-1.rhel6.i686
请给我建议以解决此错误冲突。
# rpm -qi compat-libevent14
Name : compat-libevent14 Relocations: (not relocatable)
Version : 1.4.13 Vendor: (none)
Release : 1.rhel6 Build Date: Mon 19 Sep 2011 04:50:45 PM WIT
Install Date: Fri 28 Oct 2011 10:10:03 PM WIT Build Host: koji-sl6-i386-pg91
Group : System Environment/Libraries Source RPM: compat-libevent14-1.4.13-1.rhel6.src.rpm
Size : 427200 License: BSD
Signature : DSA/SHA1, Mon 19 Sep 2011 04:50:45 PM WIT, Key ID 1f16d2e1442df0f8
URL : http://monkey.org/~provos/libevent/
Summary : Abstract asynchronous event notification library
Description :
The libevent API provides a mechanism to execute a callback function
when a specific event occurs on a file descriptor or after a timeout
has been reached. libevent is meant to replace the asynchronous event
loop found in event driven network servers. An application just needs
to call event_dispatch() and can then add or remove events dynamically
without having to change the event loop.
答案1
您现有的版本compat-libevent14
来自PostgreSQL yum 存储库。有一个漏洞打开compat-libevent14
关于和之间的冲突libevent-devel
。和另一个。
假设您需要启用 PostgreSQL 存储库,最好的做法是从 PostgreSQL 存储库中删除compat-libevent14
并安装libevent
和libevent-devel
。这将需要删除任何需要 的软件包compat-libevent14
,因此只有您才能决定这是否是合理的做法。
如果这不起作用,您的选择通常是(a)联系 PostgreSQL yum 存储库的维护人员,看看他们是否有计划解决这些错误或(b)自己解决问题并推出您自己的软件包。
答案2
如果您不需要compat-libevent14
PostgreSQL repo 中提供的 libevent 版本,或者不需要该版本,则可以在 PostgreSQL repo 文件中添加排除指令。
您/etc/yum.repos.d/pgdg-93-centos.repo
可以编辑该[pgdg93]
部分并添加以下行:
exclude=*libevent*
确保将其添加到 repo 文件中的正确部分。这将从 PostgreSQL repo 中排除任何 libevent 包,并且您的包安装不会发生包冲突。