Rumah  >  Soal Jawab  >  teks badan

Centos6.3 nginx menggunakan pemasangan bundle --tanpa ujian pembangunan untuk melaporkan ralat semasa mengkonfigurasi redmine.

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /usr/local/bin/ruby extconf.rb --with-pg-config=/usr/pgsql-9.1/bin/pg_config
Using config values from /usr/pgsql-9.1/bin/pg_config
sh: /usr/pgsql-9.1/bin/pg_config: No such file or directory
sh: /usr/pgsql-9.1/bin/pg_config: No such file or directory
checking for libpq-fe.h... *** 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/local/bin/ruby
        --with-pg
        --without-pg
        --with-pg-dir
        --without-pg-dir
        --with-pg-include
        --without-pg-include=${pg-dir}/include
        --with-pg-lib
        --without-pg-lib=${pg-dir}/lib
        --with-pg-config
/usr/local/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
        from /usr/local/lib/ruby/1.9.1/mkmf.rb:506:in `try_cpp'
        from /usr/local/lib/ruby/1.9.1/mkmf.rb:970:in `block in find_header'
        from /usr/local/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
        from /usr/local/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
        from /usr/local/lib/ruby/1.9.1/mkmf.rb:254:in `open'
        from /usr/local/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
        from /usr/local/lib/ruby/1.9.1/mkmf.rb:254:in `open'
        from /usr/local/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
        from /usr/local/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
        from /usr/local/lib/ruby/1.9.1/mkmf.rb:969:in `find_header'
        from extconf.rb:41:in `<main>'


Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/pg-0.14.1 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/pg-0.14.1/ext/gem_make.out

An error occurred while installing pg (0.14.1), and Bundler cannot continue.
Make sure that `gem install pg -v '0.14.1'` succeeds before bundling.
大家讲道理大家讲道理2712 hari yang lalu695

membalas semua(1)saya akan balas

  • 大家讲道理

    大家讲道理2017-05-16 17:31:48

    Sebab ralat ini ialah tiada pakej dev untuk PostgreSql dan pelanggan PostgreSql tidak boleh berjaya disusun; terdapat dua penyelesaian:

    1) Pasang pakej dev

    Gunakan pengurusan pakej untuk memasang, sistem RedHat adalah

    yum install postgresql-devel

    Sistem Debian ialah:

    apt-get install libpg-dev

    2) Jika anda tidak bercadang untuk menggunakan PostgreSql sebagai pangkalan data Redmine, anda boleh menggunakan arahan berikut untuk mengabaikan permata yang sepadan:

    bundle install --without development test postgresql

    Anda juga boleh mengabaikan sqlite dan rmagick (kedua-duanya mempunyai kebergantungan):

    bundle install --without development test postgresql sqlite rmagick

    balas
    0
  • Batalbalas