fluent-plugin-mongo icon indicating copy to clipboard operation
fluent-plugin-mongo copied to clipboard

Error: Failed to build gem native extension

Open mann2108 opened this issue 3 years ago • 7 comments

image

Getting this error while installing the plugin, can anyone help me out why this is happening?

mann2108 avatar Nov 03 '21 20:11 mann2108

Closing this issue, as I am able to solve these errors.

mann2108 avatar Nov 08 '21 14:11 mann2108

Facing the same problem. What did you do to solve this issue?

catnip-se avatar Nov 25 '21 09:11 catnip-se

I am also seeing this

thegalah avatar Nov 28 '21 08:11 thegalah

Facing the same problem. What did you do to solve this issue?

If you use RubyInstaller with MSYS2 version (newer than 2.4), you can use ridk exec command to inject MSYS2 related environment variables into PATH:

$ ridk exec gem fluent-gem install fluent-plugin-mongo

In Windows, GNU toolchain is not provided by default. You need to provide another way, such as MSYS2 installation and telling where to put it.

cosmo0920 avatar Dec 02 '21 02:12 cosmo0920

I have the same problem.. I have installed fluentd on windows.. some plugins are getting installed but mongo plugin is not getting installed..

"In Windows, GNU toolchain is not provided by default. You need to provide another way, such as MSYS2 installation and telling where to put it."

Sorry.. I do ont understand this.. can you please tell me how do I do this in windows?

karspartha avatar Jun 05 '22 13:06 karspartha

Please follow the instruction to install MSYS2: https://www.msys2.org/ Or, If you install RubyInstaller with MSYS2, ridk exec command can be executed by default.

cosmo0920 avatar Jun 06 '22 02:06 cosmo0920

It worked.. thanks a lot for the reference! :)

Just documenting here what all I did for any one looking for this.. to install fluentd mongodb plugin on windows..

  1. Create folder etc\fluent and put fluent.conf there. Its available inside the installation. Along with that, create etc\td-agent and td-agent.conf. The second one is already there as part of installation steps.
  2. Create folder cache in td-agent\lib\ruby\gems\2.7.0
  3. Ensure permissions to write is available for currently logged in user for all the folders under td-agent
  4. Install msys2 as mentioned by cosmo0920 as above

karspartha avatar Jun 06 '22 03:06 karspartha