当前位置:  开发笔记 > 后端 > 正文

无法在digitalocean上安装本机扩展

如何解决《无法在digitalocean上安装本机扩展》经验,为你挑选了1个好方法。

当我bundle install在终端上使用命令时(虽然我已连接到数字海洋服务器),我不断收到此错误.

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /usr/local/rvm/gems/ruby-2.2.3/gems/json-1.8.3/ext/json/ext/generator
/usr/local/rvm/rubies/ruby-2.2.3/bin/ruby -r ./siteconf20151226-8411-15s6u34.rb extconf.rb
creating Makefile

current directory: /usr/local/rvm/gems/ruby-2.2.3/gems/json-1.8.3/ext/json/ext/generator
make "DESTDIR=" clean

current directory: /usr/local/rvm/gems/ruby-2.2.3/gems/json-1.8.3/ext/json/ext/generator
make "DESTDIR="
compiling generator.c
linking shared-object json/ext/generator.so
/usr/bin/ld: cannot find -lgmp
collect2: error: ld returned 1 exit status
make: *** [generator.so] Error 1

make failed, exit code 2 

Gem files will remain installed in /usr/local/rvm/gems/ruby-2.2.3/gems/json-1.8.3 for inspection.
Results logged to /usr/local/rvm/gems/ruby-2.2.3/extensions/x86_64-linux/2.2.0/json-1.8.3/gem_make.out

这对于大多数宝石而言它们都略有不同,但他们都说"无法构建宝石原生扩展".我到处寻找,我不完全确定发生了什么.



1> Raman..:

我假设错误发生在json-1.8.3gem中,因此尝试

sudo apt-get install libgmp3-dev

然后再bundle install看看它是否已修复.

推荐阅读
雯颜哥_135
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有