cygwin - 在 Cygwin 上安装 octopress 时出现 "spawn.h not found"

标签 cygwin bundle rbenv spawn octopress

我一直在尝试在 cygwin 上安装 octopress。我用谷歌搜索过但没有结果。我希望有人可以建议一种破解方法(无论多么复杂)来解决这个问题。

我关注了octopress installation instructions 。一切都很顺利,直到 bundle 安装阶段。当我达到这一点时,安装退出并出现错误,提示找不到 spawn.h

我搜索了一下,显然 spawn.h 没有出现在任何 cygwin 库中。我安装了 cygwin 安装程序中可以安装的所有 C++ 库,但这没有帮助。

您能帮忙解决这个问题吗?

最佳答案

我认为在此过程中失败的 gem 是 posix-spawn 。为此,您可以在本地安装 gem:

$ gem install rake-compiler -v 0.7.6
$ git clone git://github.com/rtomayko/posix-spawn.git
$ cd posix-spawn
$ rake gem
$ cd pkg/posix-spawn-0.3.6
$ gem install --local posix-spawn-0.3.6.gem

解释(来 self 发现的 article):

There is a bug in the version of posix-spawn in the gem repositories however that makes installing via gem impossible on Cygwin

在此之后,尝试 bundle install再次,它应该会成功。

这是相关的 issue在 GitHub 项目上


更新:我最近安装了 scoop Windows 命令行安装程序,安装非常简单。我毫不费力地安装了 Ruby、bundler 和 octopress。你应该尝试一下。

关于cygwin - 在 Cygwin 上安装 octopress 时出现 "spawn.h not found",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15815574/

相关文章:

git - 以 cygwin 和 Github for Windows 结尾的行

windows - 为什么我的 Windows 机器上的 git 很慢?

php - Symfony2 - bundle 的 fatal error

sqlite - 将sqlite数据库与app和stringByAppendingPathComponent bundle 在一起

macos - 在 Mac OS X 应用程序包中打包 C 二进制文件

ruby - 需要 C 扩展的 rbenv 和 gem

ruby - 为每个 ruby​​ 版本重新安装每个 gem?

ruby、gem、rbenv 命令未找到

linux - 从 Cygwin 到 arm-linux 的交叉构建 boost

c++ - Pthreaded 程序在 Linux 机器上导致段错误。在 Cygwin64 上运行良好