First enable Linux apps in the Chromebook settings. Click here.

Opening the Linux Terminal application that is available after installing Linux support and entering "sudo install stellarium" at this point will install Stellarium, but it is an old version. To get the latest version, you need to use Flatpak. The latest version of Flatpak is needed to get the latest version of Stellarium. These instructions are for Ubuntu Linux but they work on a Chromebook as well. They were taken from this page.

Go to the terminal app, type (or copy-paste) this command, and press return.

sudo apt install flatpak

If that didn't work, you may have an old version of Ubuntu, and you'll need to include these commands first. After typing each command, press return.

sudo add-apt-repository ppa:alexlarsson/flatpak
sudo apt update
sudo apt install flatpak

Now enter this command to gain access to Flathub.

sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

The next two commands will allow you to install and run Stellarium. They were taken from this page.

sudo flatpak install flathub org.stellarium.Stellarium

An icon from which to run Stellarium should now be available. It can also be run from the terminal by entering

flatpak run org.stellarium.Stellarium

To update Stellarium when a new version is released, the command is

sudo flatpak update