I have been getting this message each time I try to install something in terminal.
Hi and welcome to our community. You will need to supply more information for the community to be able help you. That is what OS you are using and what version of it you are using. That way members who use it can help further.
And did you try to follow the advice and ran the following command:
sudo apt --fix-missing install