1
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

apt --fix-brokenが発生した!!

Last updated at Posted at 2020-02-11

久しぶりにVirtualboxでkali linuxをいじくり回してたらハマったので備忘録として記す。

発生原因

apt update
apt upgrade
apt dist-upgrade
彼奴らを実行後、ディスク不足で失敗
後からわかったが、不要パッケージが悪さを働き、その後の全てのaptの失敗してたっぽい

エラーメッセージ内容から抜粋

apt --fix-broken install
これを実行してくれとのメッセージが出力される

倣って実行するもまたエラー

/var/cache/apt/archives/*内でエラーが発生とのこと

訳がわからなくなったので、aptについて学習

aptは/var/cache/apt/archives/配下にパッケージを保存していくとのこと
なので、一斉に削除することを覚悟

不要パッケージは以下のコマンドで削除可能

command description
sudo apt clean APTキャッシュの削除
sudo apt autoclean APTキャッシュから使っていないファイルを削除

結果

その後、アーカイブ配下は空になり、無事apt実行できるようになりました!

備考(リポジトリ確認手順)

リポジトリ参照先の編集
vim /etc/apt/sources.list

貼り付け
deb http://http.kali.org/kali kali-rolling main contrib non-free

参考サイト

https://blog.treedown.net/entry/2019/05/15/010000
https://news.mynavi.jp/article/20190724-864746/

1
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?