English 中文(简体)
ERROR: 安装了精神病院: ERROR: Faileding gem soil extension
原标题:ERROR: Error installing psych: ERROR: Failed to build gem native extension

我正试图将心理更新到5.0,但我收到以下错误信息:

Updating psych
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR:  Error installing psych:
        ERROR: Failed to build gem native extension.

    current directory: C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/psych-5.0.0/ext/psych
C:/Ruby31-x64/bin/ruby.exe -I C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0 extconf.rb
checking for yaml.h... no
yaml.h not found
*** 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:
.
.
.

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  C:/Ruby31-x64/lib/ruby/gems/3.1.0/extensions/x64-mingw-ucrt/3.1.0/psych-5.0.0/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/psych-5.0.0 for inspection.
Results logged to C:/Ruby31-x64/lib/ruby/gems/3.1.0/extensions/x64-mingw-ucrt/3.1.0/psych-5.0.0/gem_make.out

Triedgem Update,gem pristine -all, 同差错。

如何在视窗上确定这一点?

谢谢!

最佳回答

不知道如何定下来,但我掌握了<代码>ge Update,并且对心理进行了更新,使之达到5.0.2。

问题回答

我在Macing OSX13.2问题上也存在同样的问题。 Bundle 装置之所以失败,是因为它发现的是Yaml.h。

由于我上了Mac和行车,我做了一次。

brew install libyaml

之后再安装。 它的工作是正确的。

“男: “快乐”一词不被公认为是圆柱、功能、文字或可执行方案的名称。 检查姓名的拼写,如果包括一条路,核实道路正确,并再次尝试。”

您应使用MSYS2终端,如“pacman-S mingw-w64-ucrt-x86_64-libyaml”。 该系统将安装到MSYS2,供窗口使用。

I m going to comment because it may be that other people face the same problem and this could help. I solved this problem on Windows 11 pro by running powershell as administrator and then running the "gem update" command. The system updated psych and I was able to create projects using the "rails new" command. Before the terminal showed an error message that said "Installing psych 5.1.2 with native extensions error: failed to start transaction (unable to lock database) error: unable to lock database: Permission denied Gem::Ext::BuildError: ERROR: Failed to build gem native extension."

您需要通过pacman-S mingw-w64-ucrt-x86_64-libyaml在指挥中安装 rub





相关问题
Why running a service as Local System is bad on windows?

I am trying to find out the difference between difference service account types. I tumbled upon this question. The answer was because it has powerful access to local resources, and Network Service ...

Programmatically detect Windows cluster configuration?

Does anyone know how to programatically detect that a Windows server is part of a cluster? Further, is it possible to detect that the server is the active or passive node? [Edit] And detect it from ...

get file icon for Outlook appointment (.msg)

I ve read Get File Icon used by Shell and the other similar posts - and already use SHFileInfo to get the associated icon for any given extension, and that works great. However, Outlook uses ".msg" ...

Identifying idle state on a windows machine

I know about the GetLastInputInfo method but that would only give me the duration since last user input - keyboard or mouse. If a user input was last received 10 minutes ago, that wouldn t mean the ...

Terminating a thread gracefully not using TerminateThread()

My application creates a thread and that runs in the background all the time. I can only terminate the thread manually, not from within the thread callback function. At the moment I am using ...

热门标签