sudo apt --修复损坏的安装错误

sudo apt --修复损坏的安装错误

我正在尝试这样做,sudo apt-get install kali-Linux-full但我遇到了这个错误,这阻止了我进一步前进。我尝试清理该文件并将其删除,但即使我是 root,我也没有权限。 Linux 新手,因此任何帮助、提示或技巧将不胜感激。

root@host:~$ sudo apt-get install kali-linux-full
Reading package lists... Done
Building dependency tree
Reading state information... Done
kali-linux-full is already the newest version (2020.1.0).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 kali-linux-large : Depends: jsql-injection but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
root@host:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  freeglut3 gir1.2-notify-0.7 gir1.2-packagekitglib-1.0 gir1.2-polkit-1.0 gir1.2-secret-1
  ibverbs-providers libhwloc5 libibverbs1 libpackagekit-glib2-18
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  jsql-injection
The following NEW packages will be installed:
  jsql-injection
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1643 not fully installed or removed.
Need to get 0 B/1,982 kB of archives.
After this operation, 2,257 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
E: Invalid archive signature
E: Internal error, could not locate member control.tar.{zstlz4gzxzbz2lzma}
E: Prior errors apply to /var/cache/apt/archives/jsql-injection_0.81-0kali2_all.deb
debconf: apt-extracttemplates failed: No such file or directory
dpkg-deb: error: '/var/cache/apt/archives/jsql-injection_0.81-0kali2_all.deb' is not a Debian format archive
dpkg: error processing archive /var/cache/apt/archives/jsql-injection_0.81-0kali2_all.deb (--unpack):
 dpkg-deb --control subprocess returned error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/jsql-injection_0.81-0kali2_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@host:~$ 

答案1

我遇到了这个问题。为了解决这个问题,我重命名了 deb 文件,然后成功执行了更新。

sudo mv /var/cache/apt/archives/jsql-injection_0.81-0kali2_all.deb \
/var/cache/apt/archives/jsql-injection_0.81-0kali2_all.deb.old
sudo apt-get install jsql-injection

之后我又回去进行其他安装。希望这可以帮助。

相关内容