【发布时间】:2015-06-21 18:35:26
【问题描述】:
我在 Windows 上安装 ruby-ldap gem 时遇到问题(我有 ruby 2.1.6 并且配置了 devkit 来编译扩展)。当我尝试 gem install 时出现以下错误,它会引发以下错误
extconf.rb:197:in ``': Permission denied - lib /def:./win/wldap32.def /out:./win/wldap32.lib (Errno:
:EACCES)
我尝试以管理员身份安装 我尝试在我的 win 文件夹中添加 wldap32.lib 文件
这是此问题的完整日志 暂时增强 PATH 以包含 DevKit... 构建原生扩展。这可能需要一段时间... 错误:安装 ruby-ldap 时出错: 错误:无法构建 gem 原生扩展。
C:/Ruby21/bin/ruby.exe extconf.rb
*** 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
--with-netscape
--without-netscape
--without-netscape
--with-mozilla
--without-mozilla
--without-mozilla
--with-openldap1
--without-openldap1
--without-openldap1
--with-openldap2
--without-openldap2
--without-openldap2
--with-wldap32
--without-wldap32
--without-wldap32
--with-ldap-dir
--without-ldap-dir
--with-ldap-include
--without-ldap-include=${ldap-dir}/include
--with-ldap-lib
--without-ldap-lib=${ldap-dir}/lib
--with-ldap-dir
--without-ldap-dir
--without-ldap-dir
--with-ldap
--without-ldap
--without-ldap
extconf.rb:197:in ``': Permission denied - lib /def:./win/wldap32.def /out:./win/wldap32.lib (Errno:
:EACCES)
from extconf.rb:197:in `<main>'
--with-wldap32
extconf failed, exit code 1
【问题讨论】: