dpkg: 处理软件包 dradis 时出错

dpkg: 处理软件包 dradis 时出错

我刚刚运行了apt-get update && apt-get upgrade,结果如下:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up dradis (3.1.0~rc2+git20160609-0kali2) ...
Warning: The home dir /var/lib/dradis you specified already exists.
The system user `dradis' already exists. Exiting.
/usr/lib/ruby/vendor_ruby/bundler/resolver.rb:194:in `block in initialize': 
    undefined method `add_root_vertex' for Molinillo::DependencyGraph:[]:Molinillo::DependencyGraph (NoMethodError)
    from /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:194:in `initialize'
    from /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:181:in `new'
    from /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:181:in `resolve'
    from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:200:in `resolve'
    from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:140:in `specs'
    from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:185:in `specs_for'
    from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:174:in `requested_specs'
    from /usr/lib/ruby/vendor_ruby/bundler/environment.rb:18:in `requested_specs'
    from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:13:in `setup'
    from /usr/lib/ruby/vendor_ruby/bundler.rb:127:in `setup'
    from /usr/lib/ruby/vendor_ruby/bundler/setup.rb:8:in `<top (required)>'
    from /usr/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/lib/dradis/config/boot.rb:3:in `<top (required)>'
    from bin/rake:2:in `require_relative'
    from bin/rake:2:in `<main>'
dpkg: error processing package dradis (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 dradis
E: Sub-process /usr/bin/dpkg returned an error code (1)

我应该怎么办?

答案1

deb包中定义了一些钩子,在包安装、卸载等过程中可以执行脚本。看来在您的情况下,其中一个脚本失败了,因此整个安装失败:

 /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:194:in `block in initialize': 
    undefined method `add_root_vertex' for Molinillo::DependencyGraph:[]:Molinillo::DependencyGraph (NoMethodError)

所以打包机无法在库中找到它想要调用的方法。根据这个问题在 Bundler 的 Github repo 中,您可能正在使用 Bundler 的旧版本。因此,也许升级 Bundler 会有所帮助。具体需要怎么做取决于您如何安装 Ruby 包括 Bundler(软件包系统、RVM、rbenv 等)

答案2

我在 Kali 中遇到了同样的问题。删除 dradis 后问题就解决了。

apt-get remove dradis

相关内容