2013-03-21 49 views
15

Tôi cố gắng để cài đặt GITLAB. Tôi nhận được lỗi này thực hiện "sudo gem install charlock_holmes --version '0.6.9'" (phần Install Gems)Lỗi khi cài đặt charlock_holmes: Lỗi khi cài đặt GITLAB

GEOGIT:/geogit/Administrative_Tools # sudo gem install charlock_holmes --version '0.6.9' 
Building native extensions. This could take a while... 
ERROR: Error installing charlock_holmes: 
     ERROR: Failed to build gem native extension. 

     /usr/bin/ruby1.9 extconf.rb 
checking for main() in -licui18n... no 
which: no brew in (/usr/sbin:/bin:/usr/bin:/sbin) 
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}/ 
     --with-make-prog 
     --without-make-prog 
     --srcdir=. 
     --curdir 
     --ruby=/usr/bin/ruby1.9 
     --with-icu-dir 
     --without-icu-dir 
     --with-icu-include 
     --without-icu-include=${icu-dir}/include 
     --with-icu-lib 
     --without-icu-lib=${icu-dir}/ 
     --with-icui18nlib 
     --without-icui18nlib 
     --with-icui18nlib 
     --without-icui18nlib 

Gem files will remain installed in /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9 for inspection. 
Results logged to /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/ext/charlock_holmes/gem_make.out 

Ai đó, có thể giúp tôi gỡ lỗi các bản ghi và báo lỗi?

Trả lời

30

này trông giống như issue 1952

It was actually weirdness with the way my ubuntu VPS is commissioned. Mine did not come with a C compiler or libdev obviously.

The problem fix I found was to install libdev first, then the GCC
Then apt-get install libicu-dev .

Cập nhật 2015: ý kiến ​​bổ sung bao gồm:

yum install libicu-devel worked for me

You just need to make sure " patch " is installed (yum install patch) then it should work

+0

** Phần lớn nhờ !! ** – Proverbio

+1

@Proverbio bạn nên chấp nhận câu trả lời vì nó rõ ràng là đúng (giải quyết vấn đề của tôi cũng). – sadmicrowave

+0

Đối với hồ sơ, các gói được cài đặt trong Arch Linux được gọi là chỉ 'icu'. – fonini

0

Tôi đã phạm sai lầm tương tự trên 5,4 máy chủ Centos, kho yum chỉ có phiên bản ICU 3.6, vì vậy tôi phải tìm kiếm và cài đặt bằng tay thư viện ICU 4.2 mà giải quyết vấn đề. Trong trường hợp người khác cần phải biết làm thế nào để làm điều đó, tôi khuyên bạn nên kiểm tra liên kết này http://source.icu-project.org/repos/icu/icu/tags/release-4-2-1/readme.html#HowToBuildUNIX

1

tôi đã sử dụng "yum install libicu-devel" và sau đó tôi có thể cài đặt charlock_holmes

3

Đối với hệ điều hành MacOS cài đặt phụ thuộc sau:

brew install icu4c 
0

tôi đã loại cùng một vấn đề: khi tôi đã cố gắng để cài đặt charlock_holmes đá quý, tôi đã có lỗi này:

charlock_holmes-0.7.3/mkmf.log 
have_library: checking for main() in -licui18n... -------------------- no 

tôi cố định i t bằng cách chạy lệnh đầu tiên của @VonC:

sudo apt-get install libicu-dev 

Hy vọng tôi đã giúp ai đó!