ruby – 在Windows上可能与libgit2一起使用Rugged gem安装问题
发布时间:2020-12-17 02:24:21 所属栏目:百科 来源:网络整理
导读:我正在使用 Windows,我的Gemfile有这一行: gem 'rugged' 当我运行bundle install时,它给了我这个错误: Installing rugged 0.21.0 with native extensionsGem::Ext::BuildError: ERROR: Failed to build gem native extension. C:/Ruby21/bin/ruby.exe extc
我正在使用
Windows,我的Gemfile有这一行:
gem 'rugged' 当我运行bundle install时,它给了我这个错误: Installing rugged 0.21.0 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. C:/Ruby21/bin/ruby.exe extconf.rb --use-system-libraries checking for cmake... no ERROR: CMake is required to build Rugged. *** 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=C:/Ruby21/bin/ruby extconf failed,exit code 1 Gem files will remain installed in C:/Ruby21/lib/ruby/gems/2.1.0/gems/rugged-0.21.0 for inspection. Results logged to C:/Ruby21/lib/ruby/gems/2.1.0/extensions/x86-mingw32/2.1.0/rugged-0.21.0/gem_make.out An error occurred while installing rugged(0.21.0),and Bundler cannot continue. Make sure that `gem install rugged -v '0.21.0'` succeeds before bundling. 我猜它与libgit2有关,但我不确定. 解决方法
这实际上是一个我很惊讶的问题.但坚固耐用需要CMake& pkg-config以便正确编译.
仅仅因为我们可以,我们将它们提取到DevKit本身. 首先让我们抓一个每个的副本: CMake相当直接,here’s the download link. 然后将适当的文件解压缩到DevKit中 获得它们后,您需要打开每个存档(requires 7-zip)并打开存档中的顶级文件夹. 尝试重新安装它应该只是工作,你不要用更多的东西弄脏你的PATH. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |