I tried to install virtualbox but something went wrong, and I force quitted the ubuntu software, now I can't remove the program and can't reinstall it and when I try to purge the program from the terminal I get the message that the package needs to be reinstalled.
$ sudo apt-get purge virtualbox-5.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: The package virtualbox-5.1 needs to be reinstalled, but I can't find
an archive for it.
Also when I try to reinstall using ubuntu software it just won't doing , an icon appears in the dock that says "waiting to install".