bin/ld.exe: cannot find -lgmp collect2.exe: error: ld returned 1 exit status
-
If I try to install json gem, I get this error:
$ gem install json -v '2.1.0' Fetching: json-2.1.0.gem (100%) Temporarily enhancing PATH for MSYS/MINGW... Building native extensions. This could take a while... ERROR: Error installing json: ERROR: Failed to build gem native extension. current directory: C:/laragon-ruby/bin/ruby/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-2.1.0/ext/json/ext/generator C:/laragon-ruby/bin/ruby/Ruby24-x64/bin/ruby.exe -r ./siteconf20181211-3760-18relmd.rb extconf.rb creating Makefile current directory: C:/laragon-ruby/bin/ruby/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-2.1.0/ext/json/ext/generator make "DESTDIR=" clean current directory: C:/laragon-ruby/bin/ruby/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-2.1.0/ext/json/ext/generator make "DESTDIR=" generating generator-x64-mingw32.def compiling generator.c linking shared-object json/ext/generator.so c:/laragon-ruby/bin/devkit/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgmp collect2.exe: error: ld returned 1 exit status make: *** [generator.so] Error 1 make failed, exit code 2 Gem files will remain installed in C:/laragon-ruby/bin/ruby/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-2.1.0 for inspection. Results logged to C:/laragon-ruby/bin/ruby/Ruby24-x64/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/json-2.1.0/gem_make.out $ cat C:/laragon-ruby/bin/ruby/Ruby24-x64/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/json-2.1.0/gem_make.out current directory: C:/laragon-ruby/bin/ruby/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-2.1.0/ext/json/ext/generator C:/laragon-ruby/bin/ruby/Ruby24-x64/bin/ruby.exe -r ./siteconf20181211-3760-18relmd.rb extconf.rb creating Makefile current directory: C:/laragon-ruby/bin/ruby/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-2.1.0/ext/json/ext/generator make "DESTDIR=" clean current directory: C:/laragon-ruby/bin/ruby/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-2.1.0/ext/json/ext/generator make "DESTDIR=" generating generator-x64-mingw32.def compiling generator.c linking shared-object json/ext/generator.so c:/laragon-ruby/bin/devkit/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgmp collect2.exe: error: ld returned 1 exit status make: *** [generator.so] Error 1 make failed, exit code 2
Please advice
-
@Samir-Sabri : Did you add
DevKit
(Menu > Tools > Quick add > DevKit)?
-
Thanks for quick response, I found that I have installed a ruby version without the devkit.
By the way, there is no Quick add menu at Menu > Tools >
-
@Samir-Sabri : You need to have Laragon 4.0+ for the
Quick add
feature.
https://forum.laragon.org/topic/1204/laragon-4-0-released-with-quick-add-feature