1

Opennebula 5.10 から 5.12 へのデータベースの移行中に問題が発生しました。onedb upgrade コマンドの後、エラーが表示されます

他のバージョンでコンパイルされたマイグレーターを実行しようとしていますコンパイル済み: 2.0、インストール済み: 2.6

これを生成する関数:

def load_bytecode(file)
    file = File.open(file, 'rb')
    data = file.read

    file.close

    data = Zlib::Inflate.inflate(data)
    data = Marshal.load(data)

    c_ruby_version = Gem::Version.new(data.to_a[1..2].join('.'))
    i_ruby_version = Gem::Version.new(RUBY_VERSION.split('.')[0..1].join('.'))

    if c_ruby_version != i_ruby_version
        raise 'Attemp to run migrators compiled in other version' \
            "Compiled: #{c_ruby_version}, installed: #{i_ruby_version}"
    end

    new_iseq = RubyVM::InstructionSequence.load(data)
    new_iseq.eval
end

これは、ルート (2.0.0.) とユーザー (2.6.3) として異なるバージョンの ruby​​ を使用していたためだと思いました。これを変更した後 (2.6 に: root には 2.6.6. があり、ユーザーには 2.6.3. の ruby​​ のバージョンがあります)、同じエラーが表示されます。

root としてonedb upgradeコマンドも実行しようとしましたが、別の問題が発生しました。

/usr/lib/one/ruby/opennebula/xml_utils.rb:144:`module:OpenNebula': nokogiri gem がインストールされていません。(ランタイムエラー)

インストールに失敗しました:

Building native extensions. This could take a while...
ERROR:  Error installing nokogiri:
        ERROR: Failed to build gem native extension.

current directory: /opt/rh/rh-ruby26/root/usr/local/share/gems/gems/nokogiri-1.10.10/ext/nokogiri
/opt/rh/rh-ruby26/root/usr/bin/ruby -I /opt/rh/rh-ruby26/root/usr/share/rubygems -r ./siteconf20201103-67319-1vhrfa9.rb extconf.rb
mkmf.rb can't find header files for ruby at /opt/rh/rh-ruby26/root/usr/share/include/ruby.h

You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.

extconf failed, exit code 1

Gem files will remain installed in /opt/rh/rh-ruby26/root/usr/local/share/gems/gems/nokogiri-1.10.10 for inspection.
Results logged to /opt/rh/rh-ruby26/root/usr/local/lib64/gems/ruby/nokogiri-1.10.10/gem_make.out

よろしくお願いいたします。

編集 nokogiri で問題を解決しました -rh-ruby26-ruby-devel.x86_64 0:2.6.2-118.el7パッケージがありませんでした。その後、onedb upgradeルートとして実行しようとしましたが、まだ同じエラーが発生します:

Attemp to run migrators compiled in other versionCompiled: 2.0, installed: 2.6
4

0 に答える 0