2014-05-09 158 views
1

我试图安装GitLab这是在它试图安装charlock_holmes一步失败,下面是错误输出,我收到...红宝石宝石安装错误的GitLab(找不到-lmagic_ext)

我通过Puppet安装它,但它似乎是无法从源代码构建charlock_holmes的过程中找到最终make中的库lmagic_ext。

任何人都可以指向正确的方向吗?

Error: Could not update: Execution of '/usr/bin/gem install -v 0.6.9.4 --no-rdoc --no-ri charlock_holmes' returned 1: ERROR: Error ins           talling charlock_holmes: 
     ERROR: Failed to build gem native extension. 

    /usr/bin/ruby extconf.rb 
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=/usr/lib64/ruby/gems/1.8/gems/charlock_holmes-0.6.9.4/ext/charlock_holmes/dst/ --disable-shared --enable-stat           ic --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 clean 

make 
gcc -I. -I/usr/lib64/ruby/gems/1.8/gems/charlock_holmes-0.6.9.4/ext/charlock_holmes/dst/include -I. -I/usr/lib64/ruby/1.8/x86_64-linux           -I. -DHAVE_UNICODE_UCNV_H -DHAVE_MAGIC_H -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ss           p-buffer-size=4 -m64 -mtune=generic -fno-strict-aliasing -fPIC -Wall -funroll-loops -c encoding_detector.c 
common.h:14: warning: 'charlock_new_enc_str' defined but not used 
gcc -I. -I/usr/lib64/ruby/gems/1.8/gems/charlock_holmes-0.6.9.4/ext/charlock_holmes/dst/include -I. -I/usr/lib64/ruby/1.8/x86_64-linux           -I. -DHAVE_UNICODE_UCNV_H -DHAVE_MAGIC_H -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ss           p-buffer-size=4 -m64 -mtune=generic -fno-strict-aliasing -fPIC -Wall -funroll-loops -c converter.c 
common.h:23: warning: 'charlock_new_str' defined but not used 
common.h:32: warning: 'charlock_new_str2' defined but not used 
gcc -I. -I/usr/lib64/ruby/gems/1.8/gems/charlock_holmes-0.6.9.4/ext/charlock_holmes/dst/include -I. -I/usr/lib64/ruby/1.8/x86_64-linux           -I. -DHAVE_UNICODE_UCNV_H -DHAVE_MAGIC_H -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ss           p-buffer-size=4 -m64 -mtune=generic -fno-strict-aliasing -fPIC -Wall -funroll-loops -c ext.c 
common.h:14: warning: 'charlock_new_enc_str' defined but not used 
common.h:23: warning: 'charlock_new_str' defined but not used 
common.h:32: warning: 'charlock_new_str2' defined but not used 
g++ -I. -I/usr/lib64/ruby/gems/1.8/gems/charlock_holmes-0.6.9.4/ext/charlock_holmes/dst/include -I. -I/usr/lib64/ruby/1.8/x86_64-linux           -I. -DHAVE_UNICODE_UCNV_H -DHAVE_MAGIC_H -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ss           p-buffer-size=4 -m64 -mtune=generic -fno-strict-aliasing -fPIC -Wall -funroll-loops -c transliterator.cpp 
common.h:14: warning: 'VALUE charlock_new_enc_str(const char*, size_t, void*)' defined but not used 
common.h:32: warning: 'VALUE charlock_new_str2(const char*)' defined but not used 
gcc -shared -o charlock_holmes.so encoding_detector.o converter.o ext.o transliterator.o -L. -L/usr/lib64 -L. -rdynamic -Wl,-export-dy           namic -L/usr/lib64/ruby/gems/1.8/gems/charlock_holmes-0.6.9.4/ext/charlock_holmes  -lruby -lmagic_ext -licui18n -licui18n -lpthread           -lrt -ldl -lcrypt -lm -lc 
/usr/bin/ld: cannot find -lmagic_ext 
collect2: ld returned 1 exit status 
make: *** [charlock_holmes.so] Error 1 

make failed, exit code 2 

Gem files will remain installed in /usr/lib64/ruby/gems/1.8/gems/charlock_holmes-0.6.9.4 for inspection. 
Results logged to /usr/lib64/ruby/gems/1.8/extensions/x86_64-linux/1.8/charlock_holmes-0.6.9.4/gem_make.out 
Building native extensions. This could take a while... 

Error: /Stage[main]/Gitlab::Setup/Package[charlock_holmes]/ensure: change from absent to 0.6.9.4 failed: Could not update: Execution of           '/usr/bin/gem install -v 0.6.9.4 --no-rdoc --no-ri charlock_holmes' returned 1: ERROR: Error installing charlock_holmes: 
     ERROR: Failed to build gem native extension. 

    /usr/bin/ruby extconf.rb 
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=/usr/lib64/ruby/gems/1.8/gems/charlock_holmes-0.6.9.4/ext/charlock_holmes/dst/ --disable-shared --enable-stat           ic --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 clean 

make 
gcc -I. -I/usr/lib64/ruby/gems/1.8/gems/charlock_holmes-0.6.9.4/ext/charlock_holmes/dst/include -I. -I/usr/lib64/ruby/1.8/x86_64-linux           -I. -DHAVE_UNICODE_UCNV_H -DHAVE_MAGIC_H -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ss           p-buffer-size=4 -m64 -mtune=generic -fno-strict-aliasing -fPIC -Wall -funroll-loops -c encoding_detector.c 
common.h:14: warning: 'charlock_new_enc_str' defined but not used 
gcc -I. -I/usr/lib64/ruby/gems/1.8/gems/charlock_holmes-0.6.9.4/ext/charlock_holmes/dst/include -I. -I/usr/lib64/ruby/1.8/x86_64-linux           -I. -DHAVE_UNICODE_UCNV_H -DHAVE_MAGIC_H -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ss           p-buffer-size=4 -m64 -mtune=generic -fno-strict-aliasing -fPIC -Wall -funroll-loops -c converter.c 
common.h:23: warning: 'charlock_new_str' defined but not used 
common.h:32: warning: 'charlock_new_str2' defined but not used 
gcc -I. -I/usr/lib64/ruby/gems/1.8/gems/charlock_holmes-0.6.9.4/ext/charlock_holmes/dst/include -I. -I/usr/lib64/ruby/1.8/x86_64-linux           -I. -DHAVE_UNICODE_UCNV_H -DHAVE_MAGIC_H -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ss           p-buffer-size=4 -m64 -mtune=generic -fno-strict-aliasing -fPIC -Wall -funroll-loops -c ext.c 
common.h:14: warning: 'charlock_new_enc_str' defined but not used 
common.h:23: warning: 'charlock_new_str' defined but not used 
common.h:32: warning: 'charlock_new_str2' defined but not used 
g++ -I. -I/usr/lib64/ruby/gems/1.8/gems/charlock_holmes-0.6.9.4/ext/charlock_holmes/dst/include -I. -I/usr/lib64/ruby/1.8/x86_64-linux           -I. -DHAVE_UNICODE_UCNV_H -DHAVE_MAGIC_H -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ss           p-buffer-size=4 -m64 -mtune=generic -fno-strict-aliasing -fPIC -Wall -funroll-loops -c transliterator.cpp 
common.h:14: warning: 'VALUE charlock_new_enc_str(const char*, size_t, void*)' defined but not used 
common.h:32: warning: 'VALUE charlock_new_str2(const char*)' defined but not used 
gcc -shared -o charlock_holmes.so encoding_detector.o converter.o ext.o transliterator.o -L. -L/usr/lib64 -L. -rdynamic -Wl,-export-dy           namic -L/usr/lib64/ruby/gems/1.8/gems/charlock_holmes-0.6.9.4/ext/charlock_holmes  -lruby -lmagic_ext -licui18n -licui18n -lpthread           -lrt -ldl -lcrypt -lm -lc 
/usr/bin/ld: cannot find -lmagic_ext 
collect2: ld returned 1 exit status 
make: *** [charlock_holmes.so] Error 1 

make failed, exit code 2 

Gem files will remain installed in /usr/lib64/ruby/gems/1.8/gems/charlock_holmes-0.6.9.4 for inspection. 
Results logged to /usr/lib64/ruby/gems/1.8/extensions/x86_64-linux/1.8/charlock_holmes-0.6.9.4/gem_make.out 
Building native extensions. This could take a while... 
+0

这是什么操作系统?也许你缺少一个libmagic-ext或类似的软件包。 –

回答

0

似乎你使用的系统红宝石1.8是相当不推荐使用。更新到>= 1.9.3,这是GitLab需要的。建议从源代码构建它。如果你通过你的软件包管理器来安装它,确保也使用本机扩展安装gem所需的ruby devel软件包。