gpt4 book ai didi

ruby-on-rails - 在 Ubuntu 15.04 上安装 gem twitter 时出错

转载 作者:太空宇宙 更新时间:2023-11-03 17:32:18 25 4
gpt4 key购买 nike

我正在尝试在 Ubuntu 15.04 上安装 twitter gem,但此错误不断出现

gem install twitter
Building native extensions. This could take a while...
ERROR: Error installing twitter:
ERROR: Failed to build gem native extension.

/usr/bin/ruby2.1 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.1.0/gems/http_parser.rb-0.6.0 for inspection.
Results logged to /var/lib/gems/2.1.0/extensions/x86-linux/2.1.0/http_parser.rb-0.6.0/gem_make.out

最佳答案

您收到此错误是因为没有安装 ruby​​ 开发环境。编译ruby扩展需要开发环境,

您应该先使用以下命令安装开发版:

$ sudo apt-get install ruby-dev

关于ruby-on-rails - 在 Ubuntu 15.04 上安装 gem twitter 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30841189/

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