Search code examples
apt-getlinux-mint

Can not install any software because of package error


I am trying to install k3b through the terminal with sudo apt-get install k3b but when I do that it gives me the following error: The package slack-desktop needs to be reinstalled, but cant find an archive for it.

I don't care about this slack-desktop package, so I thought removing it with sudo apt-get remove slack-desktop would resolve the problem, which unfortunatly did not resolve the problem. So I tried the purge command, but no luck with that neither. How can I resolve this problem so I can install new software.


Solution

  • You should use:

    sudo dpkg --remove --force-all slack-desktop
    sudo apt-get -f install
    sudo apt-get update
    

    Also you can remove it as follow:

    sudo cp /var/lib/dpkg/status /var/lib/dpkg/status.backup
    sudo nano /var/lib/dpkg/status
    

    Press Ctrl+w then type slack-desktop , Only remove/comment out the slack-desktop entry.

    Save and exit.

    Update and install k3b:

    sudo apt-get update
    sudo apt-get install k3b