Hi, I have Kali Linux on a 256GB Encrypted Live USB. And a Kali Guest on VMware and Windows 10 Host. My question is about my Live USB. While updating I get the error: "E: Sub-process /usr/bin/dpkg returned an error code (1)." I tried my usual "sudo dpkg --configure -a" and got another error. It was about cherrytree. So I ran "sudo apt remove cherrytree" and got the repsonse:
"dpkg: error processing package cherrytree (--configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration
Errors were encountered while processing:
cherrytree"
Now when I run update I get:
"Errors were encountered while processing:
/var/cache/apt/archives/cherrytree_0.99.9~git20200901-0kali1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)"
I tried "sudo apt-get dist-upgrade" and "sudo apt-get install -f." Update still has error
"Errors were encountered while processing:
/var/cache/apt/archives/cherrytree_0.99.9~git20200901-0kali1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)"
So, then I tried: "cd /var/cache/apt/archives" and "sudo dpkg -i --force-overwrite cherrytree_0.99.9~git20200901-0kali1_amd64.deb." I got the error:
"(Reading database ... 382007 files and directories currently installed.)
Preparing to unpack cherrytree_0.99.9~git20200901-0kali1_amd64.deb ...
FAIL: unknown command-line parameter "/usr/bin/pyclean"
[hint] did you want "--/usr/bin/pyclean"?
dpkg: warning: old cherrytree package pre-removal script subprocess returned error exit status 1
dpkg: trying script from the new package instead ...
dpkg: error processing archive cherrytree_0.99.9~git20200901-0kali1_amd64.deb (--install):
there is no script in the new version of the package - giving up
FAIL: unknown command-line parameter "/usr/bin/pycompile"
[hint] did you want "--/usr/bin/pycompile"?
dpkg: error while cleaning up:
installed cherrytree package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
cherrytree_0.99.9~git20200901-0kali1_amd64.deb"
I also tried "sudo apt-get install cherrytree." Still not updating. I do not know why "sudo dpkg --configure -a" and "sudo apt-get install -f" are not working. They have in the past. And also "sudo apt-get --fix-broken install" wont work. Same error "E: Sub-process /usr/bin/dpkg returned an error code (1)." And I guess I shouldn't have removed cherrytree. So can anyone tell me how to get dpkg working? I don't want to erase and recreate my Live USB. So I need to know how to fix it without. Reply if you need any Logs. Please reply. Thanks