gpt4 book ai didi

ruby - 无法安装 restclient gem

转载 作者:行者123 更新时间:2023-12-04 03:12:48 26 4
gpt4 key购买 nike

我想在 ruby​​ 中安装 restclient。我收到这些消息:

Building native extensions.  This could take a while...
ERROR: Error installing rest-client:
ERROR: Failed to build gem native extension.

current directory: /var/lib/gems/2.3.0/gems/unf_ext-0.0.7.4/ext/unf_ext
/usr/bin/ruby2.3 -r ./siteconf20170427-2260-1nc7gtz.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include /ruby.h

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.3.0/gems/unf_ext-0.0.7.4 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/unf_ext-0.0.7.4/gem_make.out

我的终端命令是:sudo gem install rest-client

谁能帮帮我?

最佳答案

你的系统缺少开发头文件,运行:

sudo apt-get install ruby-dev zlib1g-dev liblzma-dev

关于ruby - 无法安装 restclient gem,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43652744/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com