Gem::Ext::BuildError: 错误: 无法构建 gem 本机扩展。 ArchLinux

2023-12-28

我正在尝试在我的笔记本电脑上本地运行 jekyll。 我按照Github的指南做到了这一点,https://help.github.com/articles/using-jekyll-with-pages https://help.github.com/articles/using-jekyll-with-pages不幸的是,当我输入 $bundle install 时我被卡住了 我收到以下错误:

Fetching gem metadata from https://rubygems.org/.........Failed to load /etc/gemrc due to permissions problem.
Resolving dependencies...

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

/usr/bin/ruby extconf.rb 
checking for main() in -lc... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/ruby
--with-redcloth_scan-dir
--without-redcloth_scan-dir
--with-redcloth_scan-include
--without-redcloth_scan-include=${redcloth_scan-dir}/include
--with-redcloth_scan-lib
--without-redcloth_scan-lib=${redcloth_scan-dir}/lib
--with-clib
--without-clib
 /usr/lib/ruby/2.1.0/mkmf.rb:456:in `try_do': The compiler failed to generate an         executable file. (RuntimeError)
You have to install development tools first.
from /usr/lib/ruby/2.1.0/mkmf.rb:541:in `try_link0'
from /usr/lib/ruby/2.1.0/mkmf.rb:556:in `try_link'
from /usr/lib/ruby/2.1.0/mkmf.rb:742:in `try_func'
from /usr/lib/ruby/2.1.0/mkmf.rb:973:in `block in have_library'
from /usr/lib/ruby/2.1.0/mkmf.rb:918:in `block in checking_for'
from /usr/lib/ruby/2.1.0/mkmf.rb:351:in `block (2 levels) in postpone'
from /usr/lib/ruby/2.1.0/mkmf.rb:321:in `open'
from /usr/lib/ruby/2.1.0/mkmf.rb:351:in `block in postpone'
from /usr/lib/ruby/2.1.0/mkmf.rb:321:in `open'
from /usr/lib/ruby/2.1.0/mkmf.rb:347:in `postpone'
from /usr/lib/ruby/2.1.0/mkmf.rb:917:in `checking_for'
from /usr/lib/ruby/2.1.0/mkmf.rb:968:in `have_library'
from extconf.rb:5:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /tmp/bundler20140903-2231-pkzqqj/RedCloth-4.2.9/gems /RedCloth-4.2.9 for inspection.
Results logged to /tmp/bundler20140903-2231-pkzqqj/RedCloth-4.2.9/extensions/x86_64-linux/2.1.0/RedCloth-4.2.9/gem_make.out
An error occurred while installing RedCloth (4.2.9), and Bundler cannot
continue.
Make sure that `gem install RedCloth -v '4.2.9'` succeeds before bundling.

我多次尝试安装 ruby​​,但它没有解决我的问题。你有什么提示吗?


我在 MacOS 上遇到了这个问题,通过同意 Xcode 许可证解决了这个问题。我最近更新了 Xcode,结果发现我需要重新同意许可证才能成功使用命令行工具。

赶紧跑:

xcodebuild -license
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Gem::Ext::BuildError: 错误: 无法构建 gem 本机扩展。 ArchLinux 的相关文章

  • 我无法让 ruby​​ 开发工具包适用于 Windows XP

    所以 我一生都无法让它正常工作 我的最终目标是安装 dbd odbc gem 并使其正常工作 从我读过的多篇文章来看 我需要安装ODBC 绑定 http www ch werner de rubyodbc 对于 ruby 以及 dbd od
  • ruby从1.8.7升级到1.9.2(使用Rails 3.1.1)后本地服务器错误

    我刚刚安装了rvm并使用rvm将ruby从1 8 7升级到1 9 2 我在我的应用程序上运行了捆绑安装 它重新安装了我的 gems 当我在本地运行 Rails 服务器并将浏览器导航到 localhost 3000 时 服务器日志中显示以下错
  • 致命:.git/info/refs 无效:这是一个 git 存储库吗?

    我有一个托管在 Assembla 上的 Git 存储库 我正在尝试执行以下操作 git push u origin master 我一遍又一遍地收到以下错误 fatal https url repo name git info refs n
  • 红宝石接球和效率

    catch在 Ruby 中意味着跳出深度嵌套的代码 在 Java 中 例如用Java也可以达到同样的效果try catch用于处理异常 但它被认为是糟糕的解决方案 而且效率非常低 在 Ruby 中 我们有处理异常的方法begin raise
  • Netbeans 和 Git,.obj 文件被忽略

    我正在开发一个涉及 obj 文件的小型 git 项目 当我查看 项目选项卡 时 我发现它们被忽略了 但如果我查看我的 gitignore 我无法理解为什么 DepthPeeling nbproject private DepthPeelin
  • Ruby 中的 DateTime.parse() 是否依赖于语言环境?

    我想知道以下示例的输出 解析时01 03 它会被解决为Mar 1st or Jan 3rd Ruby 不依赖于语言环境 因为红宝石是一个服务器端语言而不是客户端像 JavaScript 一样的语言 Ruby 使用系统时钟yourWeb 应用
  • 如何使用脚本在 GitHub 上发布构建工件资产?

    我正在尝试找出一种在 GitHub 上生成构建的单命令流程 我预计要做的是运行某种命令 比如 make release make release 脚本会构建发布工件 然后以某种方式将其上传到 GitHub 然而 我对如何在 GitHub 上
  • Shoulda/RSpec 匹配器 - 条件验证

    在我的代码中 我使用 Shoulda 匹配器进行了以下验证 效果很好 it should validate presence of name 在我的模型中 我已将条件添加到验证中 validates presence of name if
  • github - 启用分支锁

    作为 GitHub 管理员 我想为所有用户锁定 GitHub 中的特定分支 例如如果我不希望任何人推送到主 生产或项目分支 我该怎么做 有没有办法直接锁定 GitHub 服务器上的分支 而不是使用任何客户端挂钩 是否有任何第三方工具 API
  • Ruby 中的 url_encode

    I read 的文档url encode http rdoc info stdlib erb 1 9 3 ERB Util 3Aurl encode 是否有一个表可以准确地告诉我哪个字符被编码为什么 使用url encode ERB s u
  • 带有 git Remote 的 Gem 文件在 Heroku 推送上失败

    我的 gemfile 中有以下行 gem client side validations git gt email protected cdn cgi l email protection Dakuan client side valida
  • 比较 ruby​​ 哈希值[重复]

    这个问题在这里已经有答案了 可能的重复 如何比较两个哈希值 https stackoverflow com questions 4928789 how do i compare two hashes 我有两个 ruby 哈希值 本质上是模型
  • 如何使用 GitHub GraphQL API 查看问题已在项目的列之间转移?

    我想确定卡片何时从一列移动到另一列GitHub 项目板 https help github com articles about project boards 使用 GitHub GraphQL API 我可以在项目板中列出所有问题 例如
  • 为什么我的 Github 托管网站响应 HTTP 302 而不是 200?

    我拥有该域名penkov id au http penkov id au 我主持一个blog http michael penkov id au blog 2014 01 02 reinventing the wheel html usin
  • 从logstash中的文件名获取事件的时间戳

    我们有一个将事件写入文件的进程 没有时间戳 文件名本身带有时间戳后缀 该时间戳应用于文件中的所有事件 现在 我尝试使用logstash的输入文件插件来解析该文件 有没有一种方法可以将文件名获取到字段 以便我可以使用 gsub 过滤器提取时间
  • 无法通过 Git Bash 克隆 git 存储库

    在尝试使用克隆存储库时git clone 它显示以下错误 致命 无法访问 https github com microsoft c9 python getting started git https github com microsoft
  • 使用正则表达式搜索 Ruby 数组

    你好 我有一个小的 ruby 函数 它可以分割出一个 Ruby 数组 如下所示 def rearrange arr from to sidx arr index from eidx arr index to arr sidx arr sid
  • github actions 找不到 package.json

    我正在尝试设置一些基本的 GitHub 操作来在 PR 上撰写评论 Action 发布在 github 上 如下所示 action yml 文件 name name description description author me inp
  • 从 Ruby on Rails 应用程序运行 phantomjs

    我有兴趣使用幻影 http www phantomjs org 我想从我的 Ruby on Rails 应用程序运行它 然而 这是一个命令行工具 即我需要运行类似phantomjs rasterize js http raphaeljs c
  • 将对象转换为哈希,然后将其保存到用户的列

    找不到任何接近我想做的事情 我想将一个对象存储到用户的列中 该列采用数组的形式 postgres def change add column users interest string array true default end 我有另一

随机推荐