gpt4 book ai didi

ruby-on-rails - 无法安装 charlock_holmes-0.6.9.4

转载 作者:行者123 更新时间:2023-12-04 18:54:48 24 4
gpt4 key购买 nike

将 Ubuntu 13.04 升级到 14.04 LTS 后,gitlab 页面显示:502 GitLab 没有响应。

我试过,进入/home/git/gitlab 目录这个命令:bundle install显示此消息:

Make sure that `gem install charlock_holmes -v '0.6.9.4'` succeeds before bundling.

这个命令的结果是: gem install charlock_holmes -v '0.6.9.4'是 :
Building native extensions.  This could take a while... ERROR:  Error installing charlock_holmes:
ERROR: Failed to build gem native extension.

/usr/bin/ruby1.9.1 extconf.rb checking for main() in -licui18n... yes checking for main() in -licui18n... yes checking for unicode/ucnv.h... yes
*** 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=/usr/bin/ruby1.9.1
--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.rb:55:in `chdir': No such file or directory - /var/lib/gems/1.9.1/gems/charlock_holmes-0.6.9.4/ext/charlock_holmes/src (Errno::ENOENT)
from extconf.rb:55:in `<main>'


Gem files will remain installed in /var/lib/gems/1.9.1/gems/charlock_holmes-0.6.9.4 for inspection. Results logged to /var/lib/gems/1.9.1/gems/charlock_holmes-0.6.9.4/ext/charlock_holmes/gem_make.out

当然,目录 /var/lib/gems/1.9.1/gems/charlock_holmes-0.6.9.4/ext/charlock_holmes/仅包含 3 个文件:extconf.rb、gem_make.out、mkmf.log

但是,这个目录 /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/charlock_holmes-0.6.9.4/ext/charlock_holmes/src包含 2 个文件:file-soft-check.patch、file-5.08.tar.gz 和 1 个目录:file-5.08/

我厌倦了符号链接(symbolic link),但每次运行命令时都会删除。

有人能帮我吗 ?

谢谢

感谢你的回复。运行此命令时出现新错误:

bundle install --deployment --without development test mysql aws


/usr/bin/ruby1.9.1 extconf.rb --with-dldflags=-licuuc -Wl,--export-all-symbols -Wl,--enable-auto-image-base,--enable-auto-import
checking for main() in -licui18n... yes
checking for main() in -licui18n... yes
checking for unicode/ucnv.h... yes
-- tar zxvf file-5.08.tar.gz
-- ./configure --prefix=/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/charlock_holmes-0.6.9.4/ext/charlock_holmes/dst/ --disable-shared --enable-static --with-pic
-- patch -p0 < ../file-soft-check.patch
-- make -C src install
-- make -C magic install
checking for main() in -lmagic_ext... yes
checking for magic.h... yes
creating Makefile

make
compiling encoding_detector.c
In file included from encoding_detector.c:3:0:
common.h:14:14: warning: ‘charlock_new_enc_str’ defined but not used [-Wunused-function]
static VALUE charlock_new_enc_str(const char *str, size_t len, void *encoding)
^
compiling ext.c
In file included from ext.c:1:0:
common.h:14:14: warning: ‘charlock_new_enc_str’ defined but not used [-Wunused-function]
static VALUE charlock_new_enc_str(const char *str, size_t len, void *encoding)
^
common.h:23:14: warning: ‘charlock_new_str’ defined but not used [-Wunused-function]
static VALUE charlock_new_str(const char *str, size_t len)
^
common.h:32:14: warning: ‘charlock_new_str2’ defined but not used [-Wunused-function]
static VALUE charlock_new_str2(const char *str)
^
compiling converter.c
In file included from converter.c:2:0:
common.h:23:14: warning: ‘charlock_new_str’ defined but not used [-Wunused-function]
static VALUE charlock_new_str(const char *str, size_t len)
^
common.h:32:14: warning: ‘charlock_new_str2’ defined but not used [-Wunused-function]
static VALUE charlock_new_str2(const char *str)
^
compiling transliterator.cpp
In file included from transliterator.cpp:1:0:
common.h:14:14: warning: ‘VALUE charlock_new_enc_str(const char*, size_t, void*)’ defined but not used [-Wunused-function]
static VALUE charlock_new_enc_str(const char *str, size_t len, void *encoding)
^
common.h:32:14: warning: ‘VALUE charlock_new_str2(const char*)’ defined but not used [-Wunused-function]
static VALUE charlock_new_str2(const char *str)
^
linking shared-object charlock_holmes/charlock_holmes.so
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libicui18n.a(smpdtfmt.ao): réadressage R_X86_64_PC32 vers symbole « _ZN6icu_5216SimpleDateFormat22fgCalendarFieldToLevelE » ne peut pas être utilisé en créant un objet partagé ; recompilé avec -fPIC
/usr/bin/ld: édition de lien finale en échec: Mauvaise valeur
collect2: error: ld returned 1 exit status
make: *** [charlock_holmes.so] Erreur 1

最佳答案

这是与新 libicu 版本有关的问题(icu-52 而不是旧的 icu-51)
这对我有用:

删除 charlock_holmes:

bundle exec gem uninstall charlock_holmes

然后重新执行捆绑安装
(Postgres):
bundle install --deployment --without development test mysql aws

(或 MySQL):
bundle install --deployment --without development test postgres aws

关于ruby-on-rails - 无法安装 charlock_holmes-0.6.9.4,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23794415/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com