首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >错误:安装gollum时出错:错误:无法构建gem本机扩展

错误:安装gollum时出错:错误:无法构建gem本机扩展
EN

Stack Overflow用户
提问于 2015-08-18 17:04:02
回答 3查看 4.6K关注 0票数 5

我无法安装gollum-wiki在全新安装ruby v2.2.2通过rbenv

我跑步Ubuntu-Gnome 14.04 Trusty Thar

以下是安装日志:

代码语言:javascript
复制
user@host:~/dev/drafts$ gem install gollum
Fetching: useragent-0.10.0.gem (100%)
Successfully installed useragent-0.10.0
Fetching: mustache-0.99.8.gem (100%)
Successfully installed mustache-0.99.8
Fetching: rack-1.6.4.gem (100%)
Successfully installed rack-1.6.4
Fetching: rack-protection-1.5.3.gem (100%)
Successfully installed rack-protection-1.5.3
Fetching: tilt-2.0.1.gem (100%)
Successfully installed tilt-2.0.1
Fetching: sinatra-1.4.6.gem (100%)
Successfully installed sinatra-1.4.6
Fetching: kramdown-1.6.0.gem (100%)
Successfully installed kramdown-1.6.0
Fetching: github-markup-1.3.3.gem (100%)
Successfully installed github-markup-1.3.3
Fetching: mini_portile-0.6.2.gem (100%)
Successfully installed mini_portile-0.6.2
Fetching: nokogiri-1.6.6.2.gem (100%)
Building native extensions.  This could take a while...
Successfully installed nokogiri-1.6.6.2
Fetching: sanitize-2.1.0.gem (100%)
Successfully installed sanitize-2.1.0
Fetching: stringex-2.5.2.gem (100%)
Successfully installed stringex-2.5.2
Fetching: rouge-1.9.1.gem (100%)
Successfully installed rouge-1.9.1
Fetching: diff-lcs-1.2.5.gem (100%)
Successfully installed diff-lcs-1.2.5
Fetching: mime-types-1.25.1.gem (100%)
Successfully installed mime-types-1.25.1
Fetching: posix-spawn-0.3.11.gem (100%)
Building native extensions.  This could take a while...
Successfully installed posix-spawn-0.3.11
Fetching: charlock_holmes-0.7.3.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing gollum:
        ERROR: Failed to build gem native extension.

    /home/poremil/.rbenv/versions/2.2.2/bin/ruby -r ./siteconf20150818-19908-1246gx8.rb extconf.rb
checking for main() in -licui18n... no
checking for main() in -licui18n... no


***************************************************************************************
*********** icu required (brew install icu4c or apt-get install libicu-dev) ***********
***************************************************************************************
*** 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/poremil/.rbenv/versions/2.2.2/bin/$(RUBY_BASE_NAME)
        --with-icu-dir
        --without-icu-dir
        --with-icu-include
        --without-icu-include=${icu-dir}/include
        --with-icu-lib
        --without-icu-lib=${icu-dir}/lib
        --with-icui18nlib
        --without-icui18nlib
        --with-icui18nlib
        --without-icui18nlib

extconf failed, exit code 1

Gem files will remain installed in /home/poremil/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/charlock_holmes-0.7.3 for inspection.
Results logged to /home/poremil/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/extensions/x86_64-linux/2.2.0-static/charlock_holmes-0.7.3/gem_make.out
EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2015-08-18 17:04:02

只需安装libicu-dev通过apt

代码语言:js
复制
$ sudo apt-get install libicu-dev

然后安装gollum

代码语言:js
复制
$ gem install gollum
票数 9
EN

Stack Overflow用户

发布于 2016-02-21 23:08:56

对于Mac用户:

代码语言:js
复制
brew install icu4c

为我解决了这个问题。

票数 4
EN

Stack Overflow用户

发布于 2017-11-01 20:17:19

安装了GitLab EE omnibus后也出现了同样的问题,可通过以下方法解决:

代码语言:js
复制
apt-get install ruby ruby-dev make zlib1g-dev libicu-dev build-essential git cmake

(根据https://github.com/gollum/gollum/wiki/Installation)

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/32068038

复制
相关文章

相似问题

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