gem Rdmtx的问题 [英] Issues with gem Rdmtx

查看:77
本文介绍了gem Rdmtx的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试安装Rdmtx gem时,遇到了以下问题:

I'm facing the issue bellow when I try to install the Rdmtx gem:

$ gem install Rdmtx
Building native extensions.  This could take a while...
ERROR:  Error installing Rdmtx:
    ERROR: Failed to build gem native extension.

    /Users/alberto/.rbenv/versions/2.2.5/bin/ruby -r ./siteconf20170508-97735-7c5328.rb extconf.rb
checking for main() in -ldmtx... no
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling Rdmtx.c
Rdmtx.c:26:10: fatal error: 'dmtx.h' file not found
#include <dmtx.h>
         ^
1 error generated.
make: *** [Rdmtx.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/alberto/.rbenv/versions/2.2.5/lib/ruby/gems/2.2.0/gems/Rdmtx-0.3.1 for inspection.
Results logged to /Users/alberto/.rbenv/versions/2.2.5/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-16/2.2.0-static/Rdmtx-0.3.1/gem_make.out

我已经通过brew安装了libdmtx,但是问题仍然存在.

I have already installed libdmtx via brew but the issue remais.

有人可以帮助我吗?

推荐答案

在安装libdtmx之前,我可以重现该错误,但随后按预期安装了gem.库未安装头文件,或者gem安装过程未在正确的位置显示.要检查第一个,请查看是否可以在/usr中找到标头:

I can reproduce the error before installing libdtmx, but afterward the gem installed as expected. Either the library didn't install the header file or the gem install process didn't look in the right place. To check for the first, see if you can find the header somewhere in /usr:

$ find /usr -name dmtx.h
/usr/local/Cellar/libdmtx/0.7.4/include/dmtx.h
/usr/local/include/dmtx.h

您可以尝试运行brew doctor来查看是否存在任何问题.如果没有结果,请确保在运行brew config时看到的行如下所示:

You can try running brew doctor to see if there are any problems. If that turns up nothing, make sure when you run brew config, you see a line that looks like:

HOMEBREW_PREFIX: /usr/local

如果文件安装在/usr/local/include中,则不能在此处找到gem安装.但是,不知道在那种情况下该怎么办.

If the file is installed in /usr/local/include the gem installation must not be looking there. Not sure what to do in that case, however.

这篇关于gem Rdmtx的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆