简体   繁体   English

从源代码构建 Wazuh 代理

[英]Building Wazuh agent from sources

I'm trying to build the wazuh agent for windows from source, following the official documentation https://documentation.wazuh.com/current/deployment-options/wazuh-from-sources/wazuh-agent/index.html .我正在尝试按照官方文档https://documentation.wazuh.com/current/deployment-options/wazuh-from-sources/wazuh-agent/index.html从源代码构建 wazuh 代理。 This guide is said to be tested on Ubuntu 20.04 but after typing:据说本指南在 Ubuntu 20.04 上进行了测试,但键入后:

make deps TARGET=winagent

make TARGET=winagent

I got the following error:我收到以下错误:

grep: /etc/redhat-release: No such file or directory
curl -so external/cJSON.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/cJSON.tar.gz || true
cd external && test -e cJSON.tar.gz && gunzip cJSON.tar.gz || true
cd external && test -e cJSON.tar && tar -xf cJSON.tar || true
test -e external/cJSON.tar && rm external/cJSON.tar || true
test -d external/cJSON ||\
(curl -so external/cJSON.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/cJSON.tar.gz &&\
cd external && gunzip cJSON.tar.gz && tar -xf cJSON.tar && rm cJSON.tar)
curl -so external/curl.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/curl.tar.gz || true
cd external && test -e curl.tar.gz && gunzip curl.tar.gz || true
cd external && test -e curl.tar && tar -xf curl.tar || true
test -e external/curl.tar && rm external/curl.tar || true
test -d external/curl ||\
(curl -so external/curl.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/curl.tar.gz &&\
cd external && gunzip curl.tar.gz && tar -xf curl.tar && rm curl.tar)
curl -so external/libdb.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/libdb.tar.gz || true
cd external && test -e libdb.tar.gz && gunzip libdb.tar.gz || true
cd external && test -e libdb.tar && tar -xf libdb.tar || true
test -e external/libdb.tar && rm external/libdb.tar || true
test -d external/libdb ||\
(curl -so external/libdb.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/libdb.tar.gz &&\
cd external && gunzip libdb.tar.gz && tar -xf libdb.tar && rm libdb.tar)
curl -so external/libffi.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/libffi.tar.gz || true
cd external && test -e libffi.tar.gz && gunzip libffi.tar.gz || true
cd external && test -e libffi.tar && tar -xf libffi.tar || true
test -e external/libffi.tar && rm external/libffi.tar || true
test -d external/libffi ||\
(curl -so external/libffi.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/libffi.tar.gz &&\
cd external && gunzip libffi.tar.gz && tar -xf libffi.tar && rm libffi.tar)
curl -so external/libyaml.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/libyaml.tar.gz || true
cd external && test -e libyaml.tar.gz && gunzip libyaml.tar.gz || true
cd external && test -e libyaml.tar && tar -xf libyaml.tar || true
test -e external/libyaml.tar && rm external/libyaml.tar || true
test -d external/libyaml ||\
(curl -so external/libyaml.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/libyaml.tar.gz &&\
cd external && gunzip libyaml.tar.gz && tar -xf libyaml.tar && rm libyaml.tar)
curl -so external/openssl.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/openssl.tar.gz || true
cd external && test -e openssl.tar.gz && gunzip openssl.tar.gz || true
cd external && test -e openssl.tar && tar -xf openssl.tar || true
test -e external/openssl.tar && rm external/openssl.tar || true
test -d external/openssl ||\
(curl -so external/openssl.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/openssl.tar.gz &&\
cd external && gunzip openssl.tar.gz && tar -xf openssl.tar && rm openssl.tar)
curl -so external/procps.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/procps.tar.gz || true
cd external && test -e procps.tar.gz && gunzip procps.tar.gz || true
cd external && test -e procps.tar && tar -xf procps.tar || true
test -e external/procps.tar && rm external/procps.tar || true
test -d external/procps ||\
(curl -so external/procps.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/procps.tar.gz &&\
cd external && gunzip procps.tar.gz && tar -xf procps.tar && rm procps.tar)
curl -so external/sqlite.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/sqlite.tar.gz || true
cd external && test -e sqlite.tar.gz && gunzip sqlite.tar.gz || true
cd external && test -e sqlite.tar && tar -xf sqlite.tar || true
test -e external/sqlite.tar && rm external/sqlite.tar || true
test -d external/sqlite ||\
(curl -so external/sqlite.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/sqlite.tar.gz &&\
cd external && gunzip sqlite.tar.gz && tar -xf sqlite.tar && rm sqlite.tar)
curl -so external/zlib.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/zlib.tar.gz || true
cd external && test -e zlib.tar.gz && gunzip zlib.tar.gz || true
cd external && test -e zlib.tar && tar -xf zlib.tar || true
test -e external/zlib.tar && rm external/zlib.tar || true
test -d external/zlib ||\
(curl -so external/zlib.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/zlib.tar.gz &&\
cd external && gunzip zlib.tar.gz && tar -xf zlib.tar && rm zlib.tar)
curl -so external/audit-userspace.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/audit-userspace.tar.gz || true
cd external && test -e audit-userspace.tar.gz && gunzip audit-userspace.tar.gz || true

gzip: audit-userspace.tar.gz: not in gzip format
cd external && test -e audit-userspace.tar && tar -xf audit-userspace.tar || true
test -e external/audit-userspace.tar && rm external/audit-userspace.tar || true
test -d external/audit-userspace ||\
(curl -so external/audit-userspace.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/audit-userspace.tar.gz &&\
cd external && gunzip audit-userspace.tar.gz && tar -xf audit-userspace.tar && rm audit-userspace.tar)
curl -so external/msgpack.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/msgpack.tar.gz || true
cd external && test -e msgpack.tar.gz && gunzip msgpack.tar.gz || true
cd external && test -e msgpack.tar && tar -xf msgpack.tar || true
test -e external/msgpack.tar && rm external/msgpack.tar || true
test -d external/msgpack ||\
(curl -so external/msgpack.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/msgpack.tar.gz &&\
cd external && gunzip msgpack.tar.gz && tar -xf msgpack.tar && rm msgpack.tar)
curl -so external/bzip2.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/bzip2.tar.gz || true
cd external && test -e bzip2.tar.gz && gunzip bzip2.tar.gz || true
cd external && test -e bzip2.tar && tar -xf bzip2.tar || true
test -e external/bzip2.tar && rm external/bzip2.tar || true
test -d external/bzip2 ||\
(curl -so external/bzip2.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/bzip2.tar.gz &&\
cd external && gunzip bzip2.tar.gz && tar -xf bzip2.tar && rm bzip2.tar)
curl -so external/nlohmann.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/nlohmann.tar.gz || true
cd external && test -e nlohmann.tar.gz && gunzip nlohmann.tar.gz || true

gzip: nlohmann.tar.gz: not in gzip format
cd external && test -e nlohmann.tar && tar -xf nlohmann.tar || true
test -e external/nlohmann.tar && rm external/nlohmann.tar || true
test -d external/nlohmann ||\
(curl -so external/nlohmann.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/nlohmann.tar.gz &&\
cd external && gunzip nlohmann.tar.gz && tar -xf nlohmann.tar && rm nlohmann.tar)
curl -so external/googletest.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/googletest.tar.gz || true
cd external && test -e googletest.tar.gz && gunzip googletest.tar.gz || true

gzip: googletest.tar.gz: not in gzip format
cd external && test -e googletest.tar && tar -xf googletest.tar || true
test -e external/googletest.tar && rm external/googletest.tar || true
test -d external/googletest ||\
(curl -so external/googletest.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/googletest.tar.gz &&\
cd external && gunzip googletest.tar.gz && tar -xf googletest.tar && rm googletest.tar)
curl -so external/libpcre2.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/libpcre2.tar.gz || true
cd external && test -e libpcre2.tar.gz && gunzip libpcre2.tar.gz || true
cd external && test -e libpcre2.tar && tar -xf libpcre2.tar || true
test -e external/libpcre2.tar && rm external/libpcre2.tar || true
test -d external/libpcre2 ||\
(curl -so external/libpcre2.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/libpcre2.tar.gz &&\
cd external && gunzip libpcre2.tar.gz && tar -xf libpcre2.tar && rm libpcre2.tar)
curl -so external/libplist.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/libplist.tar.gz || true
cd external && test -e libplist.tar.gz && gunzip libplist.tar.gz || true
cd external && test -e libplist.tar && tar -xf libplist.tar || true
test -e external/libplist.tar && rm external/libplist.tar || true
test -d external/libplist ||\
(curl -so external/libplist.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/libplist.tar.gz &&\
cd external && gunzip libplist.tar.gz && tar -xf libplist.tar && rm libplist.tar)
curl -so external/pacman.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/pacman.tar.gz || true
cd external && test -e pacman.tar.gz && gunzip pacman.tar.gz || true

gzip: pacman.tar.gz: not in gzip format
cd external && test -e pacman.tar && tar -xf pacman.tar || true
test -e external/pacman.tar && rm external/pacman.tar || true
test -d external/pacman ||\
(curl -so external/pacman.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/pacman.tar.gz &&\
cd external && gunzip pacman.tar.gz && tar -xf pacman.tar && rm pacman.tar)
curl -so external/libarchive.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/libarchive.tar.gz || true
cd external && test -e libarchive.tar.gz && gunzip libarchive.tar.gz || true

gzip: libarchive.tar.gz: not in gzip format
cd external && test -e libarchive.tar && tar -xf libarchive.tar || true
test -e external/libarchive.tar && rm external/libarchive.tar || true
test -d external/libarchive ||\
(curl -so external/libarchive.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/libarchive.tar.gz &&\
cd external && gunzip libarchive.tar.gz && tar -xf libarchive.tar && rm libarchive.tar)
curl -so external/popt.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/popt.tar.gz || true
cd external && test -e popt.tar.gz && gunzip popt.tar.gz || true

gzip: popt.tar.gz: not in gzip format
cd external && test -e popt.tar && tar -xf popt.tar || true
test -e external/popt.tar && rm external/popt.tar || true
test -d external/popt ||\
(curl -so external/popt.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/popt.tar.gz &&\
cd external && gunzip popt.tar.gz && tar -xf popt.tar && rm popt.tar)
curl -so external/rpm.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/rpm.tar.gz || true
cd external && test -e rpm.tar.gz && gunzip rpm.tar.gz || true

gzip: rpm.tar.gz: not in gzip format
cd external && test -e rpm.tar && tar -xf rpm.tar || true
test -e external/rpm.tar && rm external/rpm.tar || true
test -d external/rpm ||\
(curl -so external/rpm.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/rpm.tar.gz &&\
cd external && gunzip rpm.tar.gz && tar -xf rpm.tar && rm rpm.tar)
grep: /etc/redhat-release: No such file or directory
cp /usr/i686-w64-mingw32/lib/libwinpthread-1.dll win32/libwinpthread-1.dll
cp  win32/libgcc_s_sjlj-1.dll
cp: missing destination file operand after 'win32/libgcc_s_sjlj-1.dll'
Try 'cp --help' for more information.
make: *** [Makefile:781: win32/libgcc_s_sjlj-1.dll] Error 1         

That I solved by commenting out the line #CHECK_CENTOS5:= $(shell sh -c 'grep "CentOS release 5." /etc/redhat-release > /dev/null && echo YES || echo not') In the Makefile我通过注释掉行#CHECK_CENTOS5:= $(shell sh -c 'grep "CentOS release 5." /etc/redhat-release > /dev/null && echo YES || echo not')在 Makefile 中解决了这个问题

Now I get the following error the I'm not able to solve现在我收到以下错误,我无法解决

curl -so external/cJSON.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/cJSON.tar.gz || true
cd external && test -e cJSON.tar.gz && gunzip cJSON.tar.gz || true
cd external && test -e cJSON.tar && tar -xf cJSON.tar || true
test -e external/cJSON.tar && rm external/cJSON.tar || true
test -d external/cJSON ||\
(curl -so external/cJSON.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/cJSON.tar.gz &&\
cd external && gunzip cJSON.tar.gz && tar -xf cJSON.tar && rm cJSON.tar)
curl -so external/curl.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/curl.tar.gz || true
cd external && test -e curl.tar.gz && gunzip curl.tar.gz || true
cd external && test -e curl.tar && tar -xf curl.tar || true
test -e external/curl.tar && rm external/curl.tar || true
test -d external/curl ||\
(curl -so external/curl.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/curl.tar.gz &&\
cd external && gunzip curl.tar.gz && tar -xf curl.tar && rm curl.tar)
curl -so external/libdb.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/libdb.tar.gz || true
cd external && test -e libdb.tar.gz && gunzip libdb.tar.gz || true
cd external && test -e libdb.tar && tar -xf libdb.tar || true
test -e external/libdb.tar && rm external/libdb.tar || true
test -d external/libdb ||\
(curl -so external/libdb.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/libdb.tar.gz &&\
cd external && gunzip libdb.tar.gz && tar -xf libdb.tar && rm libdb.tar)
curl -so external/libffi.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/libffi.tar.gz || true
cd external && test -e libffi.tar.gz && gunzip libffi.tar.gz || true
cd external && test -e libffi.tar && tar -xf libffi.tar || true
test -e external/libffi.tar && rm external/libffi.tar || true
test -d external/libffi ||\
(curl -so external/libffi.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/libffi.tar.gz &&\
cd external && gunzip libffi.tar.gz && tar -xf libffi.tar && rm libffi.tar)
curl -so external/libyaml.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/libyaml.tar.gz || true
cd external && test -e libyaml.tar.gz && gunzip libyaml.tar.gz || true
cd external && test -e libyaml.tar && tar -xf libyaml.tar || true
test -e external/libyaml.tar && rm external/libyaml.tar || true
test -d external/libyaml ||\
(curl -so external/libyaml.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/libyaml.tar.gz &&\
cd external && gunzip libyaml.tar.gz && tar -xf libyaml.tar && rm libyaml.tar)
curl -so external/openssl.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/openssl.tar.gz || true
cd external && test -e openssl.tar.gz && gunzip openssl.tar.gz || true
cd external && test -e openssl.tar && tar -xf openssl.tar || true
test -e external/openssl.tar && rm external/openssl.tar || true
test -d external/openssl ||\
(curl -so external/openssl.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/openssl.tar.gz &&\
cd external && gunzip openssl.tar.gz && tar -xf openssl.tar && rm openssl.tar)
curl -so external/procps.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/procps.tar.gz || true
cd external && test -e procps.tar.gz && gunzip procps.tar.gz || true
cd external && test -e procps.tar && tar -xf procps.tar || true
test -e external/procps.tar && rm external/procps.tar || true
test -d external/procps ||\
(curl -so external/procps.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/procps.tar.gz &&\
cd external && gunzip procps.tar.gz && tar -xf procps.tar && rm procps.tar)
curl -so external/sqlite.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/sqlite.tar.gz || true
cd external && test -e sqlite.tar.gz && gunzip sqlite.tar.gz || true
cd external && test -e sqlite.tar && tar -xf sqlite.tar || true
test -e external/sqlite.tar && rm external/sqlite.tar || true
test -d external/sqlite ||\
(curl -so external/sqlite.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/sqlite.tar.gz &&\
cd external && gunzip sqlite.tar.gz && tar -xf sqlite.tar && rm sqlite.tar)
curl -so external/zlib.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/zlib.tar.gz || true
cd external && test -e zlib.tar.gz && gunzip zlib.tar.gz || true
cd external && test -e zlib.tar && tar -xf zlib.tar || true
test -e external/zlib.tar && rm external/zlib.tar || true
test -d external/zlib ||\
(curl -so external/zlib.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/zlib.tar.gz &&\
cd external && gunzip zlib.tar.gz && tar -xf zlib.tar && rm zlib.tar)
curl -so external/audit-userspace.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/audit-userspace.tar.gz || true
cd external && test -e audit-userspace.tar.gz && gunzip audit-userspace.tar.gz || true

gzip: audit-userspace.tar.gz: not in gzip format
cd external && test -e audit-userspace.tar && tar -xf audit-userspace.tar || true
test -e external/audit-userspace.tar && rm external/audit-userspace.tar || true
test -d external/audit-userspace ||\
(curl -so external/audit-userspace.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/audit-userspace.tar.gz &&\
cd external && gunzip audit-userspace.tar.gz && tar -xf audit-userspace.tar && rm audit-userspace.tar)
curl -so external/msgpack.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/msgpack.tar.gz || true
cd external && test -e msgpack.tar.gz && gunzip msgpack.tar.gz || true
cd external && test -e msgpack.tar && tar -xf msgpack.tar || true
test -e external/msgpack.tar && rm external/msgpack.tar || true
test -d external/msgpack ||\
(curl -so external/msgpack.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/msgpack.tar.gz &&\
cd external && gunzip msgpack.tar.gz && tar -xf msgpack.tar && rm msgpack.tar)
curl -so external/bzip2.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/bzip2.tar.gz || true
cd external && test -e bzip2.tar.gz && gunzip bzip2.tar.gz || true
cd external && test -e bzip2.tar && tar -xf bzip2.tar || true
test -e external/bzip2.tar && rm external/bzip2.tar || true
test -d external/bzip2 ||\
(curl -so external/bzip2.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/bzip2.tar.gz &&\
cd external && gunzip bzip2.tar.gz && tar -xf bzip2.tar && rm bzip2.tar)
curl -so external/nlohmann.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/nlohmann.tar.gz || true
cd external && test -e nlohmann.tar.gz && gunzip nlohmann.tar.gz || true

gzip: nlohmann.tar.gz: not in gzip format
cd external && test -e nlohmann.tar && tar -xf nlohmann.tar || true
test -e external/nlohmann.tar && rm external/nlohmann.tar || true
test -d external/nlohmann ||\
(curl -so external/nlohmann.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/nlohmann.tar.gz &&\
cd external && gunzip nlohmann.tar.gz && tar -xf nlohmann.tar && rm nlohmann.tar)
curl -so external/googletest.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/googletest.tar.gz || true
cd external && test -e googletest.tar.gz && gunzip googletest.tar.gz || true

gzip: googletest.tar.gz: not in gzip format
cd external && test -e googletest.tar && tar -xf googletest.tar || true
test -e external/googletest.tar && rm external/googletest.tar || true
test -d external/googletest ||\
(curl -so external/googletest.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/googletest.tar.gz &&\
cd external && gunzip googletest.tar.gz && tar -xf googletest.tar && rm googletest.tar)
curl -so external/libpcre2.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/libpcre2.tar.gz || true
cd external && test -e libpcre2.tar.gz && gunzip libpcre2.tar.gz || true
cd external && test -e libpcre2.tar && tar -xf libpcre2.tar || true
test -e external/libpcre2.tar && rm external/libpcre2.tar || true
test -d external/libpcre2 ||\
(curl -so external/libpcre2.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/libpcre2.tar.gz &&\
cd external && gunzip libpcre2.tar.gz && tar -xf libpcre2.tar && rm libpcre2.tar)
curl -so external/libplist.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/libplist.tar.gz || true
cd external && test -e libplist.tar.gz && gunzip libplist.tar.gz || true
cd external && test -e libplist.tar && tar -xf libplist.tar || true
test -e external/libplist.tar && rm external/libplist.tar || true
test -d external/libplist ||\
(curl -so external/libplist.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/libplist.tar.gz &&\
cd external && gunzip libplist.tar.gz && tar -xf libplist.tar && rm libplist.tar)
curl -so external/pacman.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/pacman.tar.gz || true
cd external && test -e pacman.tar.gz && gunzip pacman.tar.gz || true

gzip: pacman.tar.gz: not in gzip format
cd external && test -e pacman.tar && tar -xf pacman.tar || true
test -e external/pacman.tar && rm external/pacman.tar || true
test -d external/pacman ||\
(curl -so external/pacman.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/pacman.tar.gz &&\
cd external && gunzip pacman.tar.gz && tar -xf pacman.tar && rm pacman.tar)
curl -so external/libarchive.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/libarchive.tar.gz || true
cd external && test -e libarchive.tar.gz && gunzip libarchive.tar.gz || true

gzip: libarchive.tar.gz: not in gzip format
cd external && test -e libarchive.tar && tar -xf libarchive.tar || true
test -e external/libarchive.tar && rm external/libarchive.tar || true
test -d external/libarchive ||\
(curl -so external/libarchive.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/libarchive.tar.gz &&\
cd external && gunzip libarchive.tar.gz && tar -xf libarchive.tar && rm libarchive.tar)
curl -so external/popt.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/popt.tar.gz || true
cd external && test -e popt.tar.gz && gunzip popt.tar.gz || true

gzip: popt.tar.gz: not in gzip format
cd external && test -e popt.tar && tar -xf popt.tar || true
test -e external/popt.tar && rm external/popt.tar || true
test -d external/popt ||\
(curl -so external/popt.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/popt.tar.gz &&\
cd external && gunzip popt.tar.gz && tar -xf popt.tar && rm popt.tar)
curl -so external/rpm.tar.gz https://packages.wazuh.com/deps/17/libraries/windows/rpm.tar.gz || true
cd external && test -e rpm.tar.gz && gunzip rpm.tar.gz || true

gzip: rpm.tar.gz: not in gzip format
cd external && test -e rpm.tar && tar -xf rpm.tar || true
test -e external/rpm.tar && rm external/rpm.tar || true
test -d external/rpm ||\
(curl -so external/rpm.tar.gz https://packages.wazuh.com/deps/17/libraries/sources/rpm.tar.gz &&\
cd external && gunzip rpm.tar.gz && tar -xf rpm.tar && rm rpm.tar)
cp /usr/i686-w64-mingw32/lib/libwinpthread-1.dll win32/libwinpthread-1.dll
cp  win32/libgcc_s_sjlj-1.dll
cp: missing destination file operand after 'win32/libgcc_s_sjlj-1.dll'
Try 'cp --help' for more information.
make: *** [Makefile:781: win32/libgcc_s_sjlj-1.dll] Error 1
                                                 

What version of Ubuntu are you using?您使用的是哪个版本的 Ubuntu?
We do not recommend editing the files commenting lines to avoid errors, since the installer contains all the necessary steps to install the agent correctly.我们不建议编辑文件注释行以避免错误,因为安装程序包含正确安装代理的所有必要步骤。
After several tests I was able to reproduce your error, and it was when I tried to generate the agent in Ubuntu 22. This is an expected bug as Wazuh version 4.3 is not supported for Ubuntu 22. I was able to compile the agent on Ubuntu 20.04 and install it with no issues.经过几次测试后,我能够重现您的错误,当时我尝试在 Ubuntu 22 中生成代理。这是一个预期的错误,因为 Ubuntu 不支持 Wazuh 4.3 版 22。我能够在 Ubuntu 上编译代理20.04 并安装它没有问题。
To note, the documentation didn't mention the repository update step, could you try running an apt-get update and then doing all the steps again in any version of Ubuntu other than 22?请注意,文档没有提到存储库更新步骤,您可以尝试运行 apt-get 更新,然后在 Ubuntu 的任何版本中再次执行所有步骤,而不是 22?
In case of any failure, could you share the output of the executed commands?如果有任何失败,你能分享执行命令的output吗?

Its not recommended to edit the files by commenting lines to avoid errors, since the installer contains all the necessary steps to install the agent correctly.不建议通过注释行来编辑文件以避免错误,因为安装程序包含正确安装代理的所有必要步骤。

After several tests I was able to reproduce the error, and it was when I tried to generate the agent in Ubuntu 22. This is an expected behavior as Wazuh version 4.3 is not supported for Ubuntu 22.经过几次测试后,我能够重现错误,这是在我尝试在 Ubuntu 22 中生成代理时发生的。这是预期的行为,因为 Ubuntu 22 不支持 Wazuh 4.3 版。

The documentation did not mention the repository update step, please run an apt-get update command at the beginning of the installation and then repeat all the steps again, make sure that the system is Ubuntu 20. 文档中没有提到更新版本库的步骤,请在安装开始时运行apt-get update命令,然后再次重复所有步骤,确保系统为Ubuntu 20。

Also, make sure that all dependencies are installed correctly as the error shown for libgcc_s_sjlj-1.dll is related to the mingw dependency.此外,请确保所有依赖项都已正确安装,因为libgcc_s_sjlj-1.dll显示的错误与mingw依赖项相关。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM