-1

When i try to install wazuh-manager i get this issue:

root@hs1:/# apt install wazuh-manager
Reading package lists... Done
Building dependency tree       
Reading state information... Done
wazuh-manager is already the newest version (4.1.5-1).
The following packages were automatically installed and are no longer required:
  geoip-database libgeoip1
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up wazuh-manager (4.1.5-1) ...
/var/lib/dpkg/info/wazuh-manager.postinst: 46: cannot create /var/ossec/etc/ossec.conf: Directory nonexistent
dpkg: error processing package wazuh-manager (--configure):
 installed wazuh-manager package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 wazuh-manager
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@hs1:/#

I did uninstall ossec-hids-agent and server using the apt remove ossec-hids-agent && apt purge ossec-hids-agent and the same for the server but still shows that error when i try to install it... For any other package i try to install i get this aswell:

root@hs1:/# apt install net-tools
Reading package lists... Done
Building dependency tree       
Reading state information... Done
net-tools is already the newest version (1.60+git20180626.aebd88e-1ubuntu1).
The following packages were automatically installed and are no longer required:
  geoip-database libgeoip1
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up wazuh-manager (4.1.5-1) ...
/var/lib/dpkg/info/wazuh-manager.postinst: 46: cannot create /var/ossec/etc/ossec.conf: Directory nonexistent
dpkg: error processing package wazuh-manager (--configure):
 installed wazuh-manager package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 wazuh-manager
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@hs1:/#
1
  • 2
    Is there something stopping you from simply creating the missing directory?
    – user535733
    Jul 15, 2021 at 18:55

1 Answer 1

0

Did you check after the purge that /var/ossec/ folder was completely removed?

Please check it and after that check if Wazuh or Ossec is still installed (any, Agent or Manager).
For instance:

sudo dpkg -l | egrep -i "ossec|wazuh"

In addition to this, verify if any daemon still running:

ps -xa | grep ossec

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .