Hi,
since i had the same problem these days i worked on a solution and fortunately found one.
My system configuration:
- OS Server : Debian 10.12
- OS Agent : MacOS Monterey, Big Sur, Catalina (seems it doesn't matter)
- Agent Perl Version : 5.30 or 5.18 (seems it doesn't matter too)
- Ocs Agent Version : Unix 2.9.3 MAC
- Ocs Server Version : 2.10.0
The problem for me wasn't the modules.conf or their permissions although i had the same error message in the logs. But in my log file there was two lines below another error which leads me to the solution:
[Mon Aug 22 14:55:46 2022][debug] Failed to load `/etc/ocsinventory-agent/modules.conf': 0
[Mon Aug 22 14:55:46 2022][debug] No modules will be used.
[Mon Aug 22 14:55:46 2022][debug] Compress::Zlib is not available! The data will be compressed with gzip instead but won't be accepted by server prior 1.02
The missing Perl module Compress::Zlib was the problem. But the installation wasn't even simple. I did the following steps to install it.
First install homebrew for macOS (line 1). After that install perlbrew (line 2), init perlbrew (line 3) and install cpanm (line 4). Finally install the Compress::Zlib module by using the cpanm command previously installed (line 5).
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
sudo curl -L https://install.perlbrew.pl | sudo bash
~/perl5/perlbrew/bin/perlbrew init
sudo ~/perl5/perlbrew/bin/perlbrew install-cpanm
sudo ~/perl5/perlbrew/bin/cpanm Module::Install Compress::Zlib
After that i started the agent and the software deployment worked. :-)
If you don't trust perlbrew you may choose another way. Install Xcode from apple developer website and use the command "cpan -i Module::Install Compress::Zlib" to install the module. But this way takes much more time and filespace since Xcode uses about 12 GB.
Hope, someone may use this information to use the software deployment feature of OCS inventory for macOS clients.
Best regards
U. Dohmen