我正在使用 kali 滚动最新版本。表演后须藤apt更新,我尝试通过执行以下操作来升级sudo apt dist-upgrade但它显示以下德拉迪斯错误。有什么办法可以解决吗?我也遵循了此中给出的所有答案关联但没有解决。去除德拉迪斯会删除kali-linux-完整,所以我没有尝试。
$ sudo apt dist-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.
2 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.6.0-0kali1) ...
Warning: The home dir /var/lib/dradis you specified already exists.
The system user `dradis' already exists. Exiting.
DEPRECATION WARNING: before_filter is deprecated and will be removed in Rails 5.1. Use before_action instead. (called from require at /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:91)
DEPRECATION WARNING: before_filter is deprecated and will be removed in Rails 5.1. Use before_action instead. (called from require at /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:91)
Faraday::Builder is now Faraday::RackBuilder.
== 1 CreateNodes: migrating ================================================== =
-- create_table(:nodes, {})
rails aborted!
StandardError: An error has occurred, this and all later migrations canceled:
SQLite3::SQLException: table "nodes" already exists: CREATE TABLE "nodes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "type_id" integer, "label" varchar, "parent_id" integer, "created_at" datetime, "updated_at" datetime)
bin/rails:4:in `require'
bin/rails:4:in `<main>'
ActiveRecord::StatementInvalid: SQLite3::SQLException: table "nodes" already exists: CREATE TABLE "nodes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "type_id" integer, "label" varchar, "parent_id" integer, "created_at" datetime, "updated_at" datetime)
bin/rails:4:in `require'
bin/rails:4:in `<main>'
SQLite3::SQLException: table "nodes" already exists
bin/rails:4:in `require'
bin/rails:4:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
dpkg: error processing package dradis (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of kali-linux-full:
kali-linux-full depends on dradis; however:
Package dradis is not configured yet.
dpkg: error processing package kali-linux-full (--configure):
dependency problems - leaving unconfigured
答案1
我遇到了同样的问题...我是这样解决的:
首先,我想我应该完全删除 dradis(和 kali-linux-full),即有问题的软件包:
apt-get purge dradis
这不会删除/etc/dradis/
目录,所以我备份了它(没有必要,但更安全,抱歉)并删除了这个小混蛋:
mkdir backup-etc-dradis && rsync -avrX /etc/dradis backup-etc-dradis && rm --recursive /etc/dradis/
沙发垫上仍然残留着 dradis 的一些残留痕迹(例如“dradis”用户),但幸运的是,我们的包管理器具有相当高的“能力”来“获取”此类问题并处理它们...... ;)
apt-get install kali-linux-full