首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为idn-ruby进行捆绑安装时出错

为idn-ruby进行捆绑安装时出错
EN

Stack Overflow用户
提问于 2018-04-27 05:32:26
回答 6查看 7.8K关注 0票数 14

我的应用程序中有twitter文本宝石。

当我进行捆绑安装时,我会得到以下错误。

需要优先解决这个问题。

我还访问了github页面https://github.com/twitter/twitter-text/issues/225

但在那里找不到解决办法。

我试图使用下面的行直接安装,但也得到了同样的错误。

代码语言:javascript
复制
gem install idn-ruby -v '0.1.0'

错误

代码语言:javascript
复制
Fetching idn-ruby 0.1.0
Installing idn-ruby 0.1.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /home/inuscg/.rvm/gems/ruby-2.3.0@idt-two/gems/idn-ruby-0.1.0/ext
/home/inuscg/.rvm/rubies/ruby-2.3.0/bin/ruby -r ./siteconf20180427-13217-1wpq9sy.rb extconf.rb
checking for main() in -lidn... no
ERROR: could not find idn library!

  Please install the GNU IDN library or alternatively specify at least one
  of the following options if the library can only be found in a non-standard
  location:
    --with-idn-dir=/path/to/non/standard/location
        or
    --with-idn-lib=/path/to/non/standard/location/lib
    --with-idn-include=/path/to/non/standard/location/include

*** 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=/home/inuscg/.rvm/rubies/ruby-2.3.0/bin/$(RUBY_BASE_NAME)
    --with-idn-dir
    --without-idn-dir
    --with-idn-include
    --without-idn-include=${idn-dir}/include
    --with-idn-lib
    --without-idn-lib=${idn-dir}/lib
    --with-idnlib
    --without-idnlib

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

  /home/inuscg/.rvm/gems/ruby-2.3.0@idt-two/extensions/x86_64-linux/2.3.0/idn-ruby-0.1.0/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /home/inuscg/.rvm/gems/ruby-2.3.0@idt-two/gems/idn-ruby-0.1.0 for inspection.
Results logged to /home/inuscg/.rvm/gems/ruby-2.3.0@idt-two/extensions/x86_64-linux/2.3.0/idn-ruby-0.1.0/gem_make.out

An error occurred while installing idn-ruby (0.1.0), and Bundler cannot continue.
Make sure that `gem install idn-ruby -v '0.1.0'` succeeds before bundling.

In Gemfile:
  twitter-text was resolved to 2.1.0, which depends on
    idn-ruby

提前谢谢你

EN

回答 6

Stack Overflow用户

回答已采纳

发布于 2018-04-27 05:39:31

根据日志中的错误显示,ERROR: could not find idn library!。安装twitter文本需要idn库。尝试先安装它,然后安装创业板。试着

代码语言:javascript
复制
sudo apt-get install libldap2-dev
sudo apt-get install libidn11-dev

希望这能解决你的问题。

对于mac:

代码语言:javascript
复制
brew install libidn
票数 27
EN

Stack Overflow用户

发布于 2018-06-18 03:12:18

在Mac电脑上,你可以:

代码语言:javascript
复制
$ brew install libidn
票数 21
EN

Stack Overflow用户

发布于 2018-06-14 15:44:47

如果您使用的是Mac,那么下面是如何安装libidn

代码语言:javascript
复制
$ brew install libidn
票数 6
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50055812

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档