Trying to install Motion - missing libs

just type sudo apt-get install libavformat<tab> to see what the newest verion of libavformat it and then install this version for me it was: sudo apt-get install libavformat56

i am using rasbian and i fixed it with adding two lines to /etc/apt/sources.list

deb Index of /raspbian/ wheezy main contrib non-free
deb-src Index of /raspbian/ wheezy main contrib non-free

If needed, the Raspbian public key can be stored into your apt-get keyring using the following command:

wget https://archive.raspbian.org/raspbian.public.key -O - | sudo apt-key add -

which i copied from: RaspbianRepository - Raspbian

and the update the machine with:
sudo apt update
or
sudo apt-get update

I have tried everything suggested above, but I must have grabbed a wrong distro of raspian as mine will not let me do deb or deb-src.

when I perform: sudo apt-get install libavformat

Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package libavformat

What should be my next step or could you link me to a start over distro? using a brand new RPi 3 with camera noir.

If you are not running OSMC as your distro, we cannot help.