install error (OSSEC 3.6.0, Debian 11)

Support/Development for OSSEC
titus
New Forum User
New Forum User
Posts: 2
Joined: Sun Nov 14, 2021 1:32 am

install error (OSSEC 3.6.0, Debian 11)

Unread post by titus »

I have the following problem when I try to install the OSSEC on a Debian 11 (Bullseye) OS

These packages has been installed from official source:
* libpcre2-dev is already the newest version (10.36-2).
* zlib1g-dev is already the newest version (1:1.2.11.dfsg-2).
* libevent-dev is already the newest version (2.1.12-stable-1).
* libssl-dev is already the newest version (1.1.1k-1+deb11u1).
* libgeoip-dev is already the newest version (1.6.12-7).

1.) OSSEC Source:
> https://www.ossec.net/download-ossec/ -> ossec-hids-3.6.0.tar.gz
> pcre2-10.32.tar.gz content copied to /src/external/pcre2-10.32

Error:

Code: Select all

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/  client-agent/agentd.o client-agent/config.o client-agent/event-forward.o client-agent/intcheck_op.o client-agent/main.o client-agent/notify.o client-agent/receiver-win.o client-agent/receiver.o client-agent/sendmsg.o client-agent/start_agent.o os_dns/os_dns.o os_crypto.a config.a shared.a os_net.a os_regex.a os_xml.a os_zlib.a  -lm -lpthread -lpcre2-8 -lssl -lcrypto -lz  -levent ./external/compat/imsg.c ./external/compat/imsg-buffer.c -o ossec-agentd
/usr/bin/ld: client-agent/config.o:(.bss+0x0): multiple definition of `server_ibuf'; client-agent/agentd.o:(.bss+0x0): first defined here
/usr/bin/ld: client-agent/event-forward.o:(.bss+0x0): multiple definition of `server_ibuf'; client-agent/agentd.o:(.bss+0x0): first defined here
/usr/bin/ld: client-agent/intcheck_op.o:(.bss+0x0): multiple definition of `server_ibuf'; client-agent/agentd.o:(.bss+0x0): first defined here
/usr/bin/ld: client-agent/main.o:(.bss+0x0): multiple definition of `server_ibuf'; client-agent/agentd.o:(.bss+0x0): first defined here
/usr/bin/ld: client-agent/notify.o:(.bss+0x0): multiple definition of `server_ibuf'; client-agent/agentd.o:(.bss+0x0): first defined here
/usr/bin/ld: client-agent/receiver.o:(.bss+0x0): multiple definition of `server_ibuf'; client-agent/agentd.o:(.bss+0x0): first defined here
/usr/bin/ld: client-agent/sendmsg.o:(.bss+0x0): multiple definition of `server_ibuf'; client-agent/agentd.o:(.bss+0x0): first defined here
/usr/bin/ld: client-agent/start_agent.o:(.bss+0x0): multiple definition of `server_ibuf'; client-agent/agentd.o:(.bss+0x0): first defined here
/usr/bin/ld: os_net.a(os_net.o):(.bss+0x0): multiple definition of `agt'; client-agent/config.o:(.bss+0x10088): first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:1017: ossec-agentd] Error 1

 Error 0x5.
 Building error. Unable to finish the installation.
 
2.) OSSEC Source:
> Directly downloaded from GitHub
> pcre2-10.32.tar.gz content copied to /src/external/pcre2-10.32

Error:

Code: Select all

 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 -DHAVE_SYSTEMD -DZLIB_SYSTEM -DUSE_PCRE2_JIT -DLIBOPENSSL_ENABLED -DLOCAL -Wall -Wextra -I./ -I./headers/ os_maild/config.o os_maild/mail_list.o os_maild/maild.o os_maild/os_maild_client.o os_maild/sendcustomemail.o os_maild/sendmail.o os_crypto.a config.a shared.a os_net.a os_regex.a os_xml.a  -lm -lpthread -lsystemd -lpcre2-8 -lssl -lcrypto -lz  ./external/compat/imsg.c ./external/compat/imsg-buffer.c -o ossec-maild
/usr/bin/ld: cannot find -lsystemd
collect2: error: ld returned 1 exit status
make: *** [Makefile:930: ossec-maild] Error 1

 Error 0x5.
 Building error. Unable to finish the installation.
I also tried with it, but got the same errors:

Code: Select all

PCRE2_SYSTEM=yes ./install.sh
Anyone have an idea how can I solve the problem?
Thank You! Titus
titus
New Forum User
New Forum User
Posts: 2
Joined: Sun Nov 14, 2021 1:32 am

Re: install error (OSSEC 3.6.0, Debian 11)

Unread post by titus »

Hi, again!

I found the solution to the problem (2nd source / error message):
Just simple install the libsystemd-dev package.
> https://github.com/ossec/ossec-hids/issues/1950

Code: Select all

 apt-get install libsystemd-dev

Sadly the official 'requirement' / dependency list not include it (at the moment):
> https://www.ossec.net/docs/docs/manual/ ... ments.html

After that the OSSEC install process will work without problems on Debian 11 (if You downloaded the OSSEC from GitHub directly!)

Best Regards:
Titus
Post Reply