ok, there is probably several ways, but what is the right way to stop a bolt etc. rotating in a hole?

I have some shaped tubes that need to be locked in a particular rotational position…