安装gitlab,nokogiri遇到的错误,大神们指点指点

非技术专家群体 发布于 2016/07/19 18:08
阅读 661
收藏 0

 `gem install nokogiri -v '1.6.8'` 

Installing nokogiri 1.6.8 with native extensions


Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
    /usr/local/bin/ruby extconf.rb
Using pkg-config version 1.1.7
checking if the C compiler accepts ... yes
Building nokogiri using packaged libraries.
Using mini_portile version 2.1.0
checking for gzdopen() in -lz... yes
checking for iconv... yes
************************************************************************
IMPORTANT NOTICE:
Building Nokogiri with a packaged version of libxml2-2.9.4.
Team Nokogiri will keep on doing their best to provide security
updates in a timely manner, but if this is a concern for you and want
to use the system library instead; abort this installation process and
reinstall nokogiri as follows:
    gem install nokogiri -- --use-system-libraries
        [--with-xml2-config=/path/to/xml2-config]
        [--with-xslt-config=/path/to/xslt-config]
If you are using Bundler, tell it to use the option
    bundle config build.nokogiri --use-system-libraries
    bundle install


Note, however, that nokogiri is not fully compatible with arbitrary
versions of libxml2 provided by OS/package vendors.
************************************************************************
Extracting libxml2-2.9.4.tar.gz into tmp/x86_64-unknown-linux-gnu/ports/libxml2/2.9.4... OK
Running 'configure' for libxml2 2.9.4... OK
Running 'compile' for libxml2 2.9.4... OK
Running 'install' for libxml2 2.9.4... OK
Activating libxml2 2.9.4 (from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.8/ports/x86_64-unknown-linux-gnu/libxml2/2.9.4)...
************************************************************************
IMPORTANT NOTICE:


Building Nokogiri with a packaged version of libxslt-1.1.29.


Team Nokogiri will keep on doing their best to provide security
updates in a timely manner, but if this is a concern for you and want
to use the system library instead; abort this installation process and
reinstall nokogiri as follows:


    gem install nokogiri -- --use-system-libraries
        [--with-xml2-config=/path/to/xml2-config]
        [--with-xslt-config=/path/to/xslt-config]


If you are using Bundler, tell it to use the option:


    bundle config build.nokogiri --use-system-libraries
    bundle install
************************************************************************
Extracting libxslt-1.1.29.tar.gz into tmp/x86_64-unknown-linux-gnu/ports/libxslt/1.1.29... OK
Running 'configure' for libxslt 1.1.29... OK
Running 'compile' for libxslt 1.1.29... ERROR, review '/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.8/ext/nokogiri/tmp/x86_64-unknown-linux-gnu/ports/libxslt/1.1.29/compile.log' to see what happened. Last lines are:
========================================================================
  CC       functions.lo
  CC       strings.lo
  CC       date.lo
  CC       saxon.lo
  CC       dynamic.lo
  CCLD     libexslt.la
make[2]: Leaving directory `/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.8/ext/nokogiri/tmp/x86_64-unknown-linux-gnu/ports/libxslt/1.1.29/libxslt-1.1.29/libexslt'
Making all in xsltproc
make[2]: Entering directory `/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.8/ext/nokogiri/tmp/x86_64-unknown-linux-gnu/ports/libxslt/1.1.29/libxslt-1.1.29/xsltproc'
  CC       xsltproc.o
  CCLD     xsltproc
/usr/bin/ld: xsltproc: undefined reference to symbol 'pthread_key_delete@@GLIBC_2.2.5'
/usr/bin/ld: note: 'pthread_key_delete@@GLIBC_2.2.5' is defined in DSO /lib64/libpthread.so.0 so try adding it to the linker command line
/lib64/libpthread.so.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[2]: *** [xsltproc] Error 1
make[2]: Leaving directory `/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.8/ext/nokogiri/tmp/x86_64-unknown-linux-gnu/ports/libxslt/1.1.29/libxslt-1.1.29/xsltproc'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.8/ext/nokogiri/tmp/x86_64-unknown-linux-gnu/ports/libxslt/1.1.29/libxslt-1.1.29'
make: *** [all] Error 2
========================================================================
*** 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.

/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/mini_portile2-2.1.0/lib/mini_portile2/mini_portile.rb:366:in `block in execute': Failed to complete compile task (RuntimeError)
        from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/mini_portile2-2.1.0/lib/mini_portile2/mini_portile.rb:337:in `chdir'
        from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/mini_portile2-2.1.0/lib/mini_portile2/mini_portile.rb:337:in `execute'
        from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/mini_portile2-2.1.0/lib/mini_portile2/mini_portile.rb:111:in `compile'
        from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/mini_portile2-2.1.0/lib/mini_portile2/mini_portile.rb:150:in `cook'
        from extconf.rb:364:in `block (2 levels) in process_recipe'
        from extconf.rb:257:in `block in chdir_for_build'
        from extconf.rb:256:in `chdir'
        from extconf.rb:256:in `chdir_for_build'
        from extconf.rb:363:in `block in process_recipe'
        from extconf.rb:262:in `tap'
        from extconf.rb:262:in `process_recipe'
        from extconf.rb:571:in `<main>'
extconf failed, exit code 1

Gem files will remain installed in /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.8 for inspection.
Results logged to /home/git/gitlab/vendor/bundle/ruby/2.1.0/extensions/x86_64-linux/2.1.0-static/nokogiri-1.6.8/gem_make.out
加载中
0
zouqilin
zouqilin
gem install nokogiri -v '1.6.8' -- -lpthread
非技术专家群体
非技术专家群体
多谢,我先试试
0
zouqilin
zouqilin
如果还是不行 libpthread.so添加到ld.so.conf中
返回顶部
顶部