Closed nodesocket closed 4 years ago
Install the libevent dev package
Was this a change in v3.4.0
needing libevent dev upgrading from v3.3.0
? Previously did not need that package.
I think so. It helps with dns resolution.
Sorry to hijack the thread but I'm having the same error trying to upgrade from 3.3.0 to 3.4.0. I install libevent-dev but now, even with the latest openssl / libssl package to date (ubuntu Server 18.04 LTS) still having the following error :
5- Installing the system
- Running the Makefile
cc -I./external/compat -DMAX_AGENTS=2048 -DOSSECHIDS -DDEFAULTDIR=\"/var/ossec\" -DUSER=\"ossec\" -DREMUSER=\"ossecr\" -DGROUPGLOBAL=\"ossec\" -DMAILUSER=\"ossecm\" -DLinux -DINOTIFY_ENABLED -DZLIB_SYSTEM -DUSE_PCRE2_JIT -DLOCAL -Wall -Wextra -I./ -I./headers/ os_maild/sendmail.o os_maild/sendcustomemail.o os_maild/config.o os_maild/os_maild_client.o os_maild/maild.o os_maild/mail_list.o os_dns/os_dns.o os_crypto.a config.a shared.a os_net.a os_regex.a os_xml.a -lm -lpthread -lpcre2-8 -lz -levent ./external/compat/imsg.c ./external/compat/imsg-buffer.c -o ossec-maild
In file included from ./external/compat/imsg.c:21:0:
./external/compat/includes.h:65:10: fatal error: openssl/opensslv.h: No such file or directory
#include <openssl/opensslv.h> /* For OPENSSL_VERSION_NUMBER */
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ./external/compat/imsg-buffer.c:21:0:
./external/compat/includes.h:65:10: fatal error: openssl/opensslv.h: No such file or directory
#include <openssl/opensslv.h> /* For OPENSSL_VERSION_NUMBER */
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
Makefile:929: recipe for target 'ossec-maild' failed
make: *** [ossec-maild] Error 1
Error 0x5.
Building error. Unable to finish the installation.
I'm using sudo but same install command as @nodesocket :
sudo PCRE2_SYSTEM=yes ./install.sh
$ dpkg -l |grep ssl
ii libevent-openssl-2.1-6:amd64 2.1.8-stable-4build1 amd64 Asynchronous event notification library (openssl)
ii libio-socket-ssl-perl 2.056-1 all Perl module implementing object oriented interface to SSL sockets
ii libnet-ssleay-perl 1.84-1build1 amd64 Perl module for Secure Sockets Layer (SSL)
ii libssl1.0.0:amd64 1.0.2n-1ubuntu5.3 amd64 Secure Sockets Layer toolkit - shared libraries
ii libssl1.1:amd64 1.1.1-1ubuntu2.1~18.04.4 amd64 Secure Sockets Layer toolkit - shared libraries
ii libxmlsec1-openssl:amd64 1.2.25-1build1 amd64 Openssl engine for the XML security library
ii libzstd1:amd64 1.3.3+dfsg-2ubuntu1 amd64 fast lossless compression algorithm
ii openssl 1.1.1-1ubuntu2.1~18.04.4 amd64 Secure Sockets Layer toolkit - cryptographic utility
ii perl-openssl-defaults:amd64 3build1 amd64 version compatibility baseline for Perl OpenSSL packages
ii python3-openssl 17.5.0-1ubuntu1 all Python 3 wrapper around the OpenSSL library
$ dpkg -l |grep libevent
ii libevent-2.1-6:amd64 2.1.8-stable-4build1 amd64 Asynchronous event notification library
ii libevent-core-2.1-6:amd64 2.1.8-stable-4build1 amd64 Asynchronous event notification library (core)
ii libevent-dev 2.1.8-stable-4build1 amd64 Asynchronous event notification library (development files)
ii libevent-extra-2.1-6:amd64 2.1.8-stable-4build1 amd64 Asynchronous event notification library (extra)
ii libevent-openssl-2.1-6:amd64 2.1.8-stable-4build1 amd64 Asynchronous event notification library (openssl)
ii libevent-pthreads-2.1-6:amd64 2.1.8-stable-4build1 amd64 Asynchronous event notification library (pthreads)
I actually solved my issue by doing
sudo apt install libssl1.0-dev
sudo PCRE2_SYSTEM=yes ./install.sh
I resolved with: apt install libz-dev libssl-dev libpcre2-dev libevent-dev build-essential
5- Installing the system
Running the Makefile cc -I./external/compat -DMAX_AGENTS=2048 -DOSSECHIDS -DDEFAULTDIR=\"/var/ossec\" -DUSER=\"ossec\" -DREMUSER=\"ossecr\" -DGROUPGLOBAL=\"ossec\" -DMAILUSER=\"ossecm\" -DLinux -DINOTIFY_ENABLED -DZLIB_SYSTEM -DUSE_PCRE2_JIT -DLIBOPENSSL_ENABLED -DLOCAL -Wall -Wextra -I./ -I./headers/ os_maild/sendmail.o os_maild/sendcustomemail.o os_maild/config.o os_maild/os_maild_client.o os_maild/maild.o os_maild/mail_list.o os_dns/os_dns.o os_crypto.a config.a shared.a os_net.a os_regex.a os_xml.a -lm -lpthread -lpcre2-8 -lssl -lcrypto -lz -levent ./external/compat/imsg.c ./external/compat/imsg-buffer.c -o ossec-maild /bin/ld: cannot find -levent collect2: error: ld returned 1 exit status make: *** [ossec-maild] Error 1
Error 0x5. Building error. Unable to finish the installation.
Oracle Linux 7.7
rpm -qa | grep libevent libevent-2.0.21-4.el7.x86_64 libev-libevent-devel-4.15-3.el7.x86_64
@upengan78 Is there a libevent-devel
package you can install?
I only see libev-libevent-devel and it's installed. yum search libevent-devel libev-libevent-devel.x86_64 : Compatibility development header with libevent for libev.
rpm -ql libev-libevent-devel.x86_64 /usr/include/event.h (This file is available)
You could run ldconfig -p | grep event
to see if it's different on that system. But I don't really have access to oracle linux, so I can't do much investigation.
@ddpbsd Thank you for helping out. I can run commands/similar commands on my platform per your hints. Thanks!! . Here is what I see ldconfig -p | grep event libverto-tevent.so.1 (libc6,x86-64) => /lib64/libverto-tevent.so.1 libtevent.so.0 (libc6,x86-64) => /lib64/libtevent.so.0 libtevent-util.so.0 (libc6,x86-64) => /lib64/libtevent-util.so.0 libparsevent.so (libc6,x86-64) => /lib64/libparsevent.so libevent_pthreads-2.0.so.5 (libc6,x86-64) => /lib64/libevent_pthreads-2.0.so.5 libevent_openssl-2.0.so.5 (libc6,x86-64) => /lib64/libevent_openssl-2.0.so.5 libevent_extra-2.0.so.5 (libc6,x86-64) => /lib64/libevent_extra-2.0.so.5 libevent_core-2.0.so.5 (libc6,x86-64) => /lib64/libevent_core-2.0.so.5 libevent-2.0.so.5 (libc6,x86-64) => /lib64/libevent-2.0.so.5 libdmraid-events-isw.so.1 (libc6,x86-64) => /lib64/libdmraid-events-isw.so.1 libdmraid-events-isw.so (libc6,x86-64) => /lib64/libdmraid-events-isw.so libdevmapper-event.so.1.02 (libc6,x86-64) => /lib64/libdevmapper-event.so.1.02 libdevmapper-event-lvm2vdo.so (libc6,x86-64) => /lib64/libdevmapper-event-lvm2vdo.so libdevmapper-event-lvm2thin.so (libc6,x86-64) => /lib64/libdevmapper-event-lvm2thin.so libdevmapper-event-lvm2snapshot.so (libc6,x86-64) => /lib64/libdevmapper-event-lvm2snapshot.so libdevmapper-event-lvm2raid.so (libc6,x86-64) => /lib64/libdevmapper-event-lvm2raid.so libdevmapper-event-lvm2mirror.so (libc6,x86-64) => /lib64/libdevmapper-event-lvm2mirror.so libdevmapper-event-lvm2.so.2.02 (libc6,x86-64) => /lib64/libdevmapper-event-lvm2.so.2.02
Oh, I should have noticed. That's libevent2. Is there a libevent1 package?
@ddpbsd No, that was available for Cent OS release 6 but any more > 7.x,
@ddpbsd I edited the src/Makefile and replaced all occurences of -levent with -lev and ./install.sh worked successfully till the end. Thank you for keeping me motivated and commands you provided helped me with better understanding how to approach. Take care.....No sure why I am not emails about updates but I am refreshing this page.. ;)
@upengan78 I've opened issue #1860 to remind myself to get back to this. Thanks for pointing it out!
Trying to upgrade from
v3.3.0
tov3.4.0
and when runningPCRE2_SYSTEM=yes ./install.sh
I am getting:Full install commands are:
Any ideas?