People keep answering this in the most boring way. Here's a slightly less boring answer:
Wait for nightfall
Sneak up to the dino
Stab it in the eye
Run into hut
The T-Rex won't be able to remove the knife, so it will become infected and eventually kill it.