我正在尝试在我的redhat linux服务器上安装gem res-client。安装了我发现的任何依赖项,但仍然不适合我。
Ruby版本:
ruby 2.3.6p384(2017-12-14修订版61254)[x86_64-linux]
[root @ feeds] #gem install rest-client
构建原生扩展。这可能需要一段时间......
错误:安装rest-client时出错:
错误:无法构建gem原生扩展。
当前目录:/opt/rh/rh-ruby23/root/usr/local/share/gems/gems/unf_ext-0.0.7.6/ext/unf_ext
/ opt / rh / rh-ruby23 / root / usr / bin / ruby -I / opt / rh / rh-ruby23 / root / usr / local / share / ruby / site_ruby -r ./siteconf20190429-62674-e4of20.rb extconf .RB
在-lstdc ++中检查main()...没有创建Makefile
当前目录:/ opt / rh / rh-ruby23 / root / usr / local / share / gems / gems / unf_ext- 0.0.7.6/ext/unf_ext
让“DESTDIR =”干净
rm -f
rm -f unf_ext.so * .o .bak mkmf.log ..time
当前目录:/opt/rh/rh-ruby23/root/usr/local/share/gems/gems/unf_ext-0.0.7.6/ext/unf_ext
制作“DESTDIR =”g ++ -I。 -I / opt / rh / rh-ruby23 / root / usr / include -I / opt / rh / rh-ruby23 / root / usr / include / ruby / backward -I / opt / rh / rh-ruby23 / root / usr / include -I。 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE = 2 -fexceptions -fstack-protector-strong --param = ssp-buffer-size = 4 -grecord-gcc-switches -mtune = generic -m64 -o unf.o -c unf.cc
make:g ++:找不到命令
make:*** [unf.o]错误127
make failed,退出代码2
Gem文件将保留在/opt/rh/rh-ruby23/root/usr/local/share/gems/gems/unf_ext-0.0.7.6中以供检查。结果记录到/opt/rh/rh-ruby23/root/usr/local/lib64/gems/ruby/unf_ext-0.0.7.6/gem_make.out
任何人都可以建议。
谢谢新浪
看起来你错过了gcc-c ++编译器。安装它:
yum install gcc-c++
build-essential g++
是失踪者。所以尝试安装:
yum install build-essential g++
然后安装所需的gem:
gem install rest-client
希望能帮助到你....
谢谢 。
我重新安装ruby和依赖项然后它工作。
问候,
他的