Когда я попытался развернуть новый код сегодня, я получил это сообщение об ошибке:
01 Warning, new version of rvm available '1.29.3', you are using older version '1.29.2'.
01 You can disable this warning with: echo rvm_autoupdate_flag=0 >> ~/.rvmrc
01 You can enable auto-update with: echo rvm_autoupdate_flag=2 >> ~/.rvmrc
01 Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
01
01 current directory:
01 /home/deployer/apps/app-staging/shared/bundle/ruby/2.3.0/gems/ovirt-engine-sdk-4.2.4/ext/ovirtsdk4c
01 /home/deployer/.rvm/rubies/ruby-2.3.3/bin/ruby -r
01 ./siteconf20180429-31340-1net0o9.rb extconf.rb
01 checking for xml2-config... no
01 *** extconf.rb failed ***
01 Could not create Makefile due to some reason, probably lack of necessary
01 libraries and/or headers. Check the mkmf.log file for more details. You may
01 need configuration options.
01
01 Provided configuration options:
01 --with-opt-dir
01 --without-opt-dir
01 --with-opt-include
01 --without-opt-include=${opt-dir}/include
01 --with-opt-lib
01 --without-opt-lib=${opt-dir}/lib
01 --with-make-prog
01 --without-make-prog
01 --srcdir=.
01 --curdir
01 --ruby=/home/deployer/.rvm/rubies/ruby-2.3.3/bin/$(RUBY_BASE_NAME)
01 --with-libxml2-config
01 --without-libxml2-config
01 --with-pkg-config
01 --without-pkg-config
01 extconf.rb:29:in `<main>': The "libxml2" package isn't available. (RuntimeError)
01
01 To see why this extension failed to compile, please check the mkmf.log which can
01 be found here:
01
01 /home/deployer/apps/app-staging/shared/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0/ovirt-engine-sdk-4.2.4/mkm…
01
01 extconf failed, exit code 1
01
01 Gem files will remain installed in
01 /home/deployer/apps/app-staging/shared/bundle/ruby/2.3.0/gems/ovirt-engine-sdk-4.2.4
01 for inspection.
01 Results logged to
01 /home/deployer/apps/app-staging/shared/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0/ovirt-engine-sdk-4.2.4/gem…
01
01 An error occurred while installing ovirt-engine-sdk (4.2.4), and Bundler cannot
01 continue.
01 Make sure that `gem install ovirt-engine-sdk -v '4.2.4'` succeeds before
01 bundling.
Локально (OSX) приложение работает отлично. Сегодня я попытался развернуть его на промежуточном сервере и столкнулся с этой ошибкой (совершенно неожиданно я просто изменил некоторый контент).
Я пытался добавить камень ovirt-engine-sdk
к Gemfile
, но это не сработало. Я попытался войти на сервер (Ubuntu) и установить его там, он был установлен, но развертывание снова не удалось.
Когда я посмотрел на файл mkmf.log
, это его содержимое:
find_executable: checking for xml2-config... -------------------- no
--------------------
"pkg-config --exists libxml2"
package configuration for libxml2 is not found
deployer@ip-172-31-46-41:~$ cat /home/deployer/apps/app-staging/shared/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0/ovirt-engine-sdk-4.2.4/gem_make.out
current directory: /home/deployer/apps/app-staging/shared/bundle/ruby/2.3.0/gems/ovirt-engine-sdk-4.2.4/ext/ovirtsdk4c
/home/deployer/.rvm/rubies/ruby-2.3.3/bin/ruby -r ./siteconf20180429-31340-1net0o9.rb extconf.rb
checking for xml2-config... no
*** 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=/home/deployer/.rvm/rubies/ruby-2.3.3/bin/$(RUBY_BASE_NAME)
--with-libxml2-config
--without-libxml2-config
--with-pkg-config
--without-pkg-config
extconf.rb:29:in `<main>': The "libxml2" package isn't available. (RuntimeError)
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/home/deployer/apps/app-staging/shared/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0/ovirt-engine-sdk-4.2.4/mkmf.log
extconf failed, exit code 1
Я тоже пытался установить (опять же, но я помню, что 2 года назад, когда я настраивал сервер, я установил его - это нужно было другим гемам) libxml2
, установка прошла хорошо, но когда я попытался разверните приложение снова - снова та же ошибка.
Я не уверен, где можно посмотреть, что может быть не так, потому что я никоим образом не изменил конфигурацию приложения, поэтому возникновение этой ошибки выглядит немного загадкой.
Сложность в том, что я даже не уверен, с чего начать отладку проблемы - ошибка не имеет абсолютно никакого отношения к изменениям содержимого, внесенным в приложение.
Спасибо за любую помощь!