0

I am trying to install nagios in hardened OS CentOS, but I can not:

checking for a BSD-compatible install... /usr/bin/install -c
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/home/nagios-4.3.2':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details

I already installed all gcc packages, but can not

any advice ?

  • Looks like /home may be mounted noexec; a common hardening option. – Jeff Schaller Oct 16 '17 at 14:59
  • mount | grep /home could confirm – Jeff Schaller Oct 16 '17 at 14:59
  • or strace -ff ... the configure and see exactly what was being run – thrig Oct 16 '17 at 15:37
  • /dev/xvdb10 on /home type ext4 (rw,noexec,nosuid,nodev) / yes noexec ,thanks , so can i make this as a exec and after this change again /home with no exec ,what y think ? – ggg Oct 16 '17 at 15:47
0

The core issue here was the the /home partition was mounted with the noexec flag, preventing the make/compilation process from running executables that it was creating.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.