Are you selecting Upload Using Programmer? If so, try just hitting the Upload Arrow after making sure you have the correct port selected.
I get the same error on IDE 1.8.5 Linux Mint 18.3 when using Upload Using Programmer with Tools/Programmer: "AVRISP mkII" selected