Others will observe that part of Hamlet’s conflict in taking revenge is the Freudian ties he has to the characters. Oedipal philosophies will say he cannot kill Claudius because he has taken the position his [Hamlet’s] oedipal impulses wishes to occupy.
Hamlet's failure to sweep to his revenge is nothing to do with a "tragic flaw", which is a 17th century mistranslation of Aristotle's "Poetics" (a text which, in fact, argues that a tragic hero is someone noble who makes some sort of mistake). Shakespeare would never have heard of the concept of tragic flaw, and likely never read Aristotle or the Greeks.
Why then, does Hamlet not revenge? Because he lives in a world where he cannot be sure of anything. Hamlet is educated at Wittenberg, the university where Protestantism was founded by Martin Luther (Protestantism was, under Elizabeth I, also the religion of England). Yet he is confronted by his father's ghost, which has come from an almost embarrassingly-detailed Catholic Purgatory. There are, he discovers, more things than can be "dreamt of in our [his and Horatio's] philosophy".
Moreover, his uncle, Claudius has always seemed smiling and nice to him: but, he discovers, one can "smile and smile and be a villain". You can't trust what people look like: even Ophelia is a fraud, as she makes her "wantonness [her] ignorance".
The spirit that I have seen
May be a devil, and the devil hath power
T'assume a pleasing shape, yea, and perhaps
Out of my weakness and my melancholy,
As he is very potent with such spirits,
Abuses me to damn me.
How can he ever know he is right to revenge? How do you revenge properly? Will Hamlet himself go to hell for doing it? It's these anxious questions that make him hesitate.
In Hamlet's case, this flaw is uncertainty and confusion. His father asks Hamlet to avenge his death; therefore Hamlet is from then on connected to the promise he makes to his father's ghost. His confusion is so great, that at one point, he contemplates suicide, but fails to go through with it. In the end Hamlet gives his own blood for the promise of revenge./p>