Add the following Personal Package Archive:
sudo add-apt-repository ppa:thierry-f/fork-michael-gruz
Then update:
sudo apt update
Install the printer and scanner drivers:
sudo apt install cnijfilter2 scangearmp2 cnijfilter-mg5100series scangearmp-mg5100series
Install the printer via Common UNIX Printing System (CUPS) using this link in the browser. Go to the 'Administration' section and log in using the system credentials.
'Add Printer' and select Canon_MG5100_series
.