简体   繁体   English

在Cygwin中安装Jekyll时出错

[英]Error Installing Jekyll in Cygwin

So I attempted to install Jekyll on Windows through Cygwin and I encountered an error when I tried to install Jekyll through Cygwin. 因此,我尝试通过Cygwin在Windows上安装Jekyll,但在尝试通过Cygwin安装Jekyll时遇到错误。 Here is the output. 这是输出。

Michael@X556UAK: ~$ gem install jekyll
Building native extensions.  This could take a while...
ERROR:  Error installing jekyll:
    ERROR: Failed to build gem native extension.

current directory: /c/Users/Michael/.gem/ruby/2.3.0/gems/ffi-1.9.18/ext/ffi_c
/usr/bin/ruby.exe -r ./siteconf20171011-7692-lgoixq.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/share/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /c/Users/Michael/.gem/ruby/2.3.0/gems/ffi-   1.9.18 for inspection.
Results logged to /c/Users/Michael/.gem/ruby/2.3.0/extensions/x86_64-cygwin/2.3.0/ffi-1.9.18/gem_make.out

I conducted some research online and I wasn't able to find a solution. 我在网上进行了一些研究,但找不到解决方案。 I tried running Cygwin as an administrator and I still got that error message. 我尝试以管理员身份运行Cygwin,但仍然收到该错误消息。

What can I do to fix this issue? 我该怎么做才能解决此问题?

I had the same issue when installing Jekyll and Ruby in the Windows 10 Bash Linux Subsystem . 在Windows 10 Bash Linux子系统中安装Jekyll和Ruby时遇到相同的问题。 It turned out, that the development package from Ruby was missing. 事实证明,缺少Ruby的开发包。 I had to install it first: 我必须先安装它:

sudo apt-get install ruby2.4-dev

In my case. 就我而言。 Try to install the dev package in Cygwin package manager, in your case its version 2.3. 尝试在Cygwin软件包管理器中安装dev软件包,以您的情况为2.3版本。

Andy 安迪

For the record, I encountered the same problem Michael did, and installing the ruby-devel package (using the Cygwin Setup installer) solved my problem. 记录下来,我遇到了迈克尔同样的问题,安装ruby-devel软件包(使用Cygwin安装程序安装程序)解决了我的问题。 A missing *-devel Cygwin package is a common cause of errors about missing header files. 缺少*-devel Cygwin软件包是导致缺少头文件的错误的常见原因。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM