暂无图片
No package 'libevent' found
我来答
分享
暂无图片 匿名用户
No package 'libevent' found


[root@gbase8c_1 mnt]# rpm -aq|grep -i libevent
libevent-2.0.21-4.el7.x86_64



/home/postgres/libevent
[postgres@gbase8c_1 libevent]$ ll
total 4
drwxr-xr-x 2 root root 29 Mar 18 16:16 bin
drwxr-xr-x 3 root root 97 Mar 18 16:16 include
drwxr-xr-x 3 root root 4096 Mar 18 16:16 lib


/soft/pgbouncer-1.12.0  执行./configure时候提示libevent不存在,但是上面我已经安装好了

checking whether strerror_r returns char *... yes
checking for integer enc/dec functions... not found
checking for library containing clock_gettime... none required
checking for library containing getsockname... none required
checking for library containing gethostbyname... none required
checking for library containing hstrerror... none required
checking for lstat... yes
checking for LIBEVENT... no
configure: error: Package requirements (libevent) were not met:

No package 'libevent' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBEVENT_CFLAGS
and LIBEVENT_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.


pg--12版本

难道pgbouncer ,libevent 的版本和pg-12 不兼容吗?

我来答
添加附件
收藏
分享
问题补充
2条回答
默认
最新
彭冲

需要安装开发包:libevent-devel

暂无图片 评论
暂无图片 有用 3
R
RC2025

The error message "No package 'libevent' found" typically occurs when you're trying to compile or install software that requires the libevent library, but it is not installed on your system. Here's how you can resolve it based on your operating system:

On Ubuntu/Debian-based systems:

  1. Open a terminal and run the following command to install the libevent development package:

    bashCopy Code

    sudo apt-get update sudo apt-get install libevent-dev

On Fedora/RHEL/CentOS-based systems:

  1. Use the dnf or yum package manager to install the library:

    bashCopy Code

    sudo dnf install libevent-devel
    Or for older versions of CentOS/RHEL:

    bashCopy Code

    sudo yum install libevent-devel

On macOS (using Homebrew):

  1. If you don't have Homebrew installed, install it first. Otherwise, you can directly install libevent using the following:

    bashCopy Code

    brew install libevent

On Windows:

  1. You may need to manually download and install libevent for Windows. Alternatively, if you are using a package manager like MSYS2 or vcpkg, you can install libevent through them:

    For MSYS2:

    bashCopy Code

    pacman -S mingw-w64-x86_64-libevent

    For vcpkg:

    bashCopy Code

    vcpkg install libevent

After installing the required package, you can try the installation or compilation again, and the error should no longer appear.

暂无图片 评论
暂无图片 有用 0
回答交流
提交
问题信息
请登录之后查看
邀请回答
暂无人订阅该标签,敬请期待~~
暂无图片墨值悬赏