ld: cannot find -lgmpと言われた時の対処法
- 2018.03.24
- Ruby

$ gem install json -v 1.8.6
を実行しようとした場合に次のようなエラーが出た。
linking shared-object json/ext/generator.so /usr/bin/ld: cannot find -lgmp collect2: error: ld returned 1 exit status Makefile:254: recipe for target 'generator.so' failed make: *** [generator.so] Error 1 make failed, exit code 2 **** An error occurred while installing json (1.8.6), and Bundler cannot continue. Make sure that `gem install json -v '1.8.6'` succeeds before bundling.
Ubuntuの場合、libgmp3-dev というパッケージを入れることで解決した。
$ sudo apt-get install libgmp3-dev
-
前の記事
REST APIにおける正しいHTTPメソッドの選択 2017.11.26
-
次の記事
記事がありません