Apt-Get Upgrade Issue...And Solution!
Sometimes you need to update your Linux computer. Simly run these two commands to get your Linux distribution up to date:
sudo apt-get update
sudo apt-get upgrade
The update command updates the list of available packages, and their corresponding latest versions. The upgrade command upgrades the packages you have installed to the latest known version. This is why you need to run these commands in order.
But what do you if you run the upgrade command, and your upgrade gets stuck at a package? You’re unsure about stopping the upgrade, because you don’t know if all, or only some of the package upgrades will fail.
The culprit might be that the software being upgraded is currently running, and can’t be upgraded without first stopping the software. This was exactly what happened to me while trying to upgrade my computer running mysql server.
I got to the point above circled in red, and I waited for about 10-15 minutes while nothing happened. Finally I googled the problem and found a solution that worked:
Open a new terminal and, in this instance, stop mysql. Once I did that, the upgrade and continued and eventually finished.
Don’t panic if your upgrade gets stuck. If the upgrade has stalled on a service that is currently running, just stop the service, and the upgrade should continue.