OSSEC HIDS cc: error trying to exec 'as': execvp:

sorry if this is in the wrong forum, but i cant find the appropriate one

I am trying to install ossec agent (2.8.1) on sles 11 sp1 and when running the ./install.sh I get this error:

cc: error trying to exec ‘as’: execvp: No such file or directory

I did install make and gcc-c++ , but I have the feeling I am missing packages
in /var/log/messages I dont see any logs regarding ossec

and the strange thing is that we have 3 servers with the same os level and ossec package and on those servers it is working

here is the complete error:

[CODE]
5- Installing the system

  • Running the Makefile
    cc: error trying to exec ‘as’: execvp: No such file or directory
    ./Makeall: line 128: ./isbigendian: No such file or directory
    INFO: Little endian set.

*** Making zlib (by Jean-loup Gailly and Mark Adler) ***
make[1]: Entering directory /tmp/ossec-hids-2.8.1/src/external' cd zlib-1.2.8/; ./configure; make libz.a; Checking for gcc... Compiler error reporting is too harsh for ./configure (perhaps remove -Werror). ** ./configure aborting. make[2]: Entering directory /tmp/ossec-hids-2.8.1/src/external/zlib-1.2.8’
make[2]: *** No rule to make target libz.a'. Stop. make[2]: Leaving directory /tmp/ossec-hids-2.8.1/src/external/zlib-1.2.8’
make[1]: *** [libz.a] Error 2
make[1]: Leaving directory `/tmp/ossec-hids-2.8.1/src/external’

Error Making zlib
make: *** [all] Error 1

Error 0x5.
Building error. Unable to finish the installation.[/CODE]

I solved the issue!!!
Instead of compiling ossec on the server, I compiled it on a working server and then copied it to other servers where I had the problem first.
Now I can install ossec without any issues and also I can use this package for future installations
here is how to compile it

[CODE]cd ossec-*/src

make setagent

make all

make build

echo “USER_BINARYINSTALL=“y”” >> ossec-hids*/etc/preloaded-vars.conf
[/CODE]

Hi ecanmaster,

[QUOTE=ecanmaster;30503]I solved the issue!!!
Instead of compiling ossec on the server, I compiled it on a working server and then copied it to other servers where I had the problem first.
Now I can install ossec without any issues and also I can use this package for future installations
here is how to compile it
[…][/QUOTE]

please allow two comments:

  1. the “as” utility (which is the “assembler” program) is part of the “binutils” package. You can run “rpm -qf $(which as)” on a working server to identify the RPM yourself and check if that RPM is installed on the “failing” server, too. If so, you might want to dig further to see why calling that program failed, as this may point to some other, basic problem with the OS install.

  2. Did you (or the package) provide a spec file? That way, you’d be able to create an installable RPM and would easily be able to even uninstall the files, run dependency checks, verify integrity of your install, keep an eye on versioning etc.

Regards,
Jens

HEllo Jens,

I did run the command:

rpm -qf $(which as) binutils-2.20.0-0.7.9

so I missed the binutils package…
thank you for the tip, this is really good to know !!

For point 2:
I just downloaded the package from the official website and didnt see any spec file, but this would be the best solution.
Havent created a rpm file before, but will do some search on internet.

Thank you very much for your suggestions.