На жестком диске установка пакета не выполняется, но работает 'gem install rugged'
Я пытаюсь установить Gitorious на Redhat 5. Я следую этим инструкциям: https://gitorious.org/gitorious/pages/Rhel_Installation
Один из шагов: rake db:create RAILS_ENV=production
Эта команда завершается с ошибкой:
[ gitorious ] sudo rake db:create RAILS_ENV=production
Could not find libdolt-0.33.14 in any of the sources
Run `bundle install` to install missing gems.
Когда я запустил 'bundle install', он не работает с:
0: makeup (0.4.4) from /usr/local/lib/ruby/gems/2.0.0/specifications/makeup-0.4.4.gemspec
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
checking for gmake... yes
checking for cmake... yes
-- cmake .. -DBUILD_CLAR=OFF -DTHREADSAFE=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS=-fPIC
Package zlib was not found in the pkg-config search path.
Perhaps you should add the directory containing `zlib.pc'
to the PKG_CONFIG_PATH environment variable
Package 'zlib', required by 'libgit2', not found
-- /usr/bin/gmake
*** 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-git2-dir
--without-git2-dir
--with-git2-include
--without-git2-include=${git2-dir}/include
--with-git2-lib
--without-git2-lib=${git2-dir}/
extconf.rb:16:in `sys': ERROR: '/usr/bin/gmake' failed (RuntimeError)
from extconf.rb:59:in `block (2 levels) in <main>'
from extconf.rb:54:in `chdir'
from extconf.rb:54:in `block in <main>'
from extconf.rb:51:in `chdir'
from extconf.rb:51:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /usr/local/lib/ruby/gems/2.0.0/bundler/gems/rugged-5f1b6d177132 for inspection.
Results logged to /usr/local/lib/ruby/gems/2.0.0/bundler/gems/extensions/x86_64-linux/2.0.0-static/rugged-0.19.0/gem_make.out
/usr/local/lib/ruby/site_ruby/2.0.0/rubygems/ext/builder.rb:89:in `run'
/usr/local/lib/ruby/site_ruby/2.0.0/rubygems/ext/ext_conf_builder.rb:37:in `block in build'
/usr/local/lib/ruby/2.0.0/tempfile.rb:324:in `open'
/usr/local/lib/ruby/site_ruby/2.0.0/rubygems/ext/ext_conf_builder.rb:17:in `build'
/usr/local/lib/ruby/site_ruby/2.0.0/rubygems/ext/builder.rb:161:in `block (2 levels) in build_extension'
/usr/local/lib/ruby/site_ruby/2.0.0/rubygems/ext/builder.rb:160:in `chdir'
/usr/local/lib/ruby/site_ruby/2.0.0/rubygems/ext/builder.rb:160:in `block in build_extension'
/usr/local/lib/ruby/site_ruby/2.0.0/rubygems/ext/builder.rb:159:in `synchronize'
/usr/local/lib/ruby/site_ruby/2.0.0/rubygems/ext/builder.rb:159:in `build_extension'
/usr/local/lib/ruby/site_ruby/2.0.0/rubygems/ext/builder.rb:198:in `block in build_extensions'
/usr/local/lib/ruby/site_ruby/2.0.0/rubygems/ext/builder.rb:195:in `each'
/usr/local/lib/ruby/site_ruby/2.0.0/rubygems/ext/builder.rb:195:in `build_extensions'
/usr/local/lib/ruby/site_ruby/2.0.0/rubygems/installer.rb:677:in `build_extensions'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/source/path.rb:174:in `generate_bin'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/source/git.rb:161:in `install'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/installer.rb:111:in `block in install_gem_from_spec'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/rubygems_integration.rb:150:in `with_build_args'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/installer.rb:110:in `install_gem_from_spec'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/installer.rb:265:in `block in install_sequentially'
/usr/local/lib/ruby/2.0.0/forwardable.rb:171:in `each'
/usr/local/lib/ruby/2.0.0/forwardable.rb:171:in `each'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/installer.rb:264:in `install_sequentially'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/installer.rb:97:in `run'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/installer.rb:15:in `install'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/cli.rb:255:in `install'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/vendor/thor/command.rb:27:in `run'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/vendor/thor/invocation.rb:121:in `invoke_command'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/vendor/thor.rb:363:in `dispatch'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/vendor/thor/base.rb:440:in `start'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/cli.rb:10:in `start'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/bin/bundle:20:in `block in <top (required)>'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/friendly_errors.rb:5:in `with_friendly_errors'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/bin/bundle:20:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
An error occurred while installing rugged (0.19.0), and Bundler cannot continue.
Make sure that `gem install rugged -v '0.19.0'` succeeds before bundling.
Я сделал 'sudo gem install rugged -v '0.19.0'`, и это работает:
[ gitorious ] sudo gem install rugged -v '0.19.0'
Building native extensions. This could take a while...
Successfully installed rugged-0.19.0
Parsing documentation for rugged-0.19.0
unable to convert "\x80" from ASCII-8BIT to UTF-8 for ../../extensions/x86_64-linux/2.0.0-static/rugged-0.19.0/rugged/rugged.so, skipping
unable to convert "\x80" from ASCII-8BIT to UTF-8 for lib/rugged/rugged.so, skipping
1 gem installed
Я попробовал 'sudo bundle install --verbose' снова, но это не помогло.
Затем я создал файл /usr/lib/pkgconfig/zlib.pc и выполнил набор PKG_CONGIF_PATH для добавления / usr / lib / pkgconfig.
zlib.pc:
prefix=/usr
exec_prefix=/usr
libdir=/usr/lib
includedir=/usr/include
sharedlibdir=/usr/lib
Name: zlib
Description: zlib compression library
Version: 1.2.3
Requires:
Libs: -L${libdir} -L${sharedlibdir} -lz
Cflags: -I${includedir}
Я запустил 'sudo bundle install --verbose', и он так же не работает...
"Gemfile" находится в главном каталоге gitorious.
Какие-либо предложения?
2 ответа
Вы пропустили зависимости. Я не знаю всего, что вам нужно, но на основе libdolt
а также libgit2
вам понадобится следующее:
yum install python-devel libicu-devel zlib-devel
Если я не ошибаюсь, позже было внесено много изменений в rugged, и это вызвало проблемы с версией cmake.
Установка последней версии cmake, исправила аналогичную проблему для меня. Пытаться:
yum install cmake