unable to install "sensu-plugins-mailer" plugin on centos 7

**sudo sensu-install -p sensu-plugins-mailer **

[SENSU-INSTALL] installing Sensu plugins …

[SENSU-INSTALL] determining if Sensu plugin gem ‘sensu-plugins-mailer’ is already installed …

false

[SENSU-INSTALL] Sensu plugin gems to be installed: [“sensu-plugins-mailer”]

[SENSU-INSTALL] installing Sensu plugin gem ‘sensu-plugins-mailer’

Building native extensions. This could take a while…

ERROR: Error installing sensu-plugins-mailer:

ERROR: Failed to build gem native extension.

current directory: /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/unf_ext-0.0.7.2/ext/unf_ext

/opt/sensu/embedded/bin/ruby -r ./siteconf20160711-4213-2izps9.rb extconf.rb

checking for main() in -lstdc++… *** extconf.rb failed ***

Could not create Makefile due to some reason, probably lack of necessary

libraries and/or headers. Check the mkmf.log file for more details. You may

need configuration options.

Provided configuration options:

–with-opt-dir

–with-opt-include

–without-opt-include=${opt-dir}/include

–with-opt-lib

–without-opt-lib=${opt-dir}/lib

–with-make-prog

–without-make-prog

–srcdir=.

–curdir

–ruby=/opt/sensu/embedded/bin/$(RUBY_BASE_NAME)

–with-static-libstdc++

–without-static-libstdc++

–with-stdc++lib

–without-stdc++lib

/opt/sensu/embedded/lib/ruby/2.3.0/mkmf.rb:456:in `try_do’: The compiler failed to generate an executable file. (RuntimeError)

You have to install development tools first.

from /opt/sensu/embedded/lib/ruby/2.3.0/mkmf.rb:541:in `try_link0’

from /opt/sensu/embedded/lib/ruby/2.3.0/mkmf.rb:556:in `try_link’

from /opt/sensu/embedded/lib/ruby/2.3.0/mkmf.rb:765:in `try_func’

from /opt/sensu/embedded/lib/ruby/2.3.0/mkmf.rb:997:in `block in have_library’

from /opt/sensu/embedded/lib/ruby/2.3.0/mkmf.rb:942:in `block in checking_for’

from /opt/sensu/embedded/lib/ruby/2.3.0/mkmf.rb:350:in `block (2 levels) in postpone’

from /opt/sensu/embedded/lib/ruby/2.3.0/mkmf.rb:320:in `open’

from /opt/sensu/embedded/lib/ruby/2.3.0/mkmf.rb:350:in `block in postpone’

from /opt/sensu/embedded/lib/ruby/2.3.0/mkmf.rb:320:in `open’

from /opt/sensu/embedded/lib/ruby/2.3.0/mkmf.rb:346:in `postpone’

from /opt/sensu/embedded/lib/ruby/2.3.0/mkmf.rb:941:in `checking_for’

from /opt/sensu/embedded/lib/ruby/2.3.0/mkmf.rb:992:in `have_library’

from extconf.rb:6:in `’

To see why this extension failed to compile, please check the mkmf.log which can be found here:

/opt/sensu/embedded/lib/ruby/gems/2.3.0/extensions/x86_64-linux/2.3.0/unf_ext-0.0.7.2/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/unf_ext-0.0.7.2 for inspection.

Results logged to /opt/sensu/embedded/lib/ruby/gems/2.3.0/extensions/x86_64-linux/2.3.0/unf_ext-0.0.7.2/gem_make.out

[SENSU-INSTALL] failed to install Sensu plugin gem ‘sensu-plugins-mailer’

[SENSU-INSTALL] you can run the sensu-install command again with --verbose for more info

[SENSU-INSTALL] please take note of any failure messages above

[SENSU-INSTALL] make sure you have build tools installed (e.g. gcc)

[SENSU-INSTALL] trying to determine the Sensu plugin homepage for sensu-plugins-mailer …

homepage: https://github.com/sensu-plugins/sensu-plugins-mailer

Facing the above issue with centos7

The issues is resolved, but installing the development tools

yum group install “Development Tools”

How did I solve the problem?
···

El lunes, 11 de julio de 2016, 7:16:26 (UTC-3), IMRAN SHAIK escribió:

**sudo sensu-install -p sensu-plugins-mailer **

[SENSU-INSTALL] installing Sensu plugins …

[SENSU-INSTALL] determining if Sensu plugin gem ‘sensu-plugins-mailer’ is already installed …

false

[SENSU-INSTALL] Sensu plugin gems to be installed: [“sensu-plugins-mailer”]

[SENSU-INSTALL] installing Sensu plugin gem ‘sensu-plugins-mailer’

Building native extensions. This could take a while…

ERROR: Error installing sensu-plugins-mailer:

ERROR: Failed to build gem native extension.

current directory: /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/unf_ext-0.0.7.2/ext/unf_ext

/opt/sensu/embedded/bin/ruby -r ./siteconf20160711-4213-2izps9.rb extconf.rb

checking for main() in -lstdc++… *** extconf.rb failed ***

Could not create Makefile due to some reason, probably lack of necessary

libraries and/or headers. Check the mkmf.log file for more details. You may

need configuration options.

Provided configuration options:

–with-opt-dir

–with-opt-include

–without-opt-include=${opt-dir}/include

–with-opt-lib

–without-opt-lib=${opt-dir}/lib

–with-make-prog

–without-make-prog

–srcdir=.

–curdir

–ruby=/opt/sensu/embedded/bin/$(RUBY_BASE_NAME)

–with-static-libstdc++

–without-static-libstdc++

–with-stdc++lib

–without-stdc++lib

/opt/sensu/embedded/lib/ruby/2.3.0/mkmf.rb:456:in `try_do’: The compiler failed to generate an executable file. (RuntimeError)

You have to install development tools first.

from /opt/sensu/embedded/lib/ruby/2.3.0/mkmf.rb:541:in `try_link0’

from /opt/sensu/embedded/lib/ruby/2.3.0/mkmf.rb:556:in `try_link’

from /opt/sensu/embedded/lib/ruby/2.3.0/mkmf.rb:765:in `try_func’

from /opt/sensu/embedded/lib/ruby/2.3.0/mkmf.rb:997:in `block in have_library’

from /opt/sensu/embedded/lib/ruby/2.3.0/mkmf.rb:942:in `block in checking_for’

from /opt/sensu/embedded/lib/ruby/2.3.0/mkmf.rb:350:in `block (2 levels) in postpone’

from /opt/sensu/embedded/lib/ruby/2.3.0/mkmf.rb:320:in `open’

from /opt/sensu/embedded/lib/ruby/2.3.0/mkmf.rb:350:in `block in postpone’

from /opt/sensu/embedded/lib/ruby/2.3.0/mkmf.rb:320:in `open’

from /opt/sensu/embedded/lib/ruby/2.3.0/mkmf.rb:346:in `postpone’

from /opt/sensu/embedded/lib/ruby/2.3.0/mkmf.rb:941:in `checking_for’

from /opt/sensu/embedded/lib/ruby/2.3.0/mkmf.rb:992:in `have_library’

from extconf.rb:6:in `’

To see why this extension failed to compile, please check the mkmf.log which can be found here:

/opt/sensu/embedded/lib/ruby/gems/2.3.0/extensions/x86_64-linux/2.3.0/unf_ext-0.0.7.2/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/unf_ext-0.0.7.2 for inspection.

Results logged to /opt/sensu/embedded/lib/ruby/gems/2.3.0/extensions/x86_64-linux/2.3.0/unf_ext-0.0.7.2/gem_make.out

[SENSU-INSTALL] failed to install Sensu plugin gem ‘sensu-plugins-mailer’

[SENSU-INSTALL] you can run the sensu-install command again with --verbose for more info

[SENSU-INSTALL] please take note of any failure messages above

[SENSU-INSTALL] make sure you have build tools installed (e.g. gcc)

[SENSU-INSTALL] trying to determine the Sensu plugin homepage for sensu-plugins-mailer …

homepage: https://github.com/sensu-plugins/sensu-plugins-mailer

Facing the above issue with centos7

By making sure you have development tools (gcc, g++, ruby-dev, etc) installed.
Under Centos it seems to be

yum group install “Development Tools”

While under Debian/Ubuntu it wood be

apt-get install build-essential

···

On Wednesday, April 26, 2017 at 4:26:44 PM UTC+2, Lucas Nolan Chattich wrote:

How did I solve the problem?
I worked perfectly. Thank you.
···

El jueves, 27 de abril de 2017, 14:04:22 (UTC-3), Alexander Skiba escribió:

By making sure you have development tools (gcc, g++, ruby-dev, etc) installed.
Under Centos it seems to be

yum group install “Development Tools”

While under Debian/Ubuntu it wood be

apt-get install build-essential

On Wednesday, April 26, 2017 at 4:26:44 PM UTC+2, Lucas Nolan Chattich wrote:

How did I solve the problem?