Why don't quaternions contradict the Fundamental Theorem of Algebra? I don't pretend to know anything much about the Fundamental Theorem of Algebra (FTA), but I do know what it states: for any polynomial with degree $n$, there are exactly $n$ solutions (roots). 
Well, when it comes to quaternions, apparently $i^2=j^2=k^2=-1$, but $i\ne j\ne k\ne i$. So now, we have apparently found three solutions to the second-degree polynomial $x^2=-1$.
I'm not aware of the justification of the FTA, nor I am I aware of Hamilton's justification for quaternions. However, I know a contradiction when I see one. What am I missing here?

Let me put my comments in an answer. As SpamIAm said, the FTA has a generalization in any integral domain : 

If $R$ is an integral domain, then any polynomial $P \in R[x]$ of degree $n$ has at most $n$ roots (counted with multiplicity)

The proof is that : $\quad $(a field is commutative, otherwise we say a non-commutative field)


*

*Any integral domain can be embedded in its field of fraction $K$

*Any field $K$ can be embedded in its algebraic closure $\overline{K}$

*In an algebraically closed field $\overline{K}$, the FTA is

Any polynomial $P \in \overline{K}[x]$ of degree $n$ has exactly $n$ roots (counted with multiplicity)

proof : 


*

*since $\overline{K}$ is algebraically closed $P \in \overline{K}[x]$ has at least one root $a \in \overline{K}$ 

*if $F$ is a field, then $P \in F[x]$ and $ P(a) = 0$ for some $ a \in F \implies P(x) = (x-a)Q(x)$ for some $Q\in F[x]$ (see polynomial long division)

*Repeating the factorization on $Q(x)$ you have $P(x) = C \prod_{j=1}^n (x-a_j)$

*If $R$ is an integral domain and $P(x) = C \prod_{j=1}^n (x-a_j)$ with $a_j \in R$ and $C \ne 0$ then $P(b) = 0 \implies b = a_j$ for some  $j$
This way you can see what steps fail for $\mathbb{H}$ a non-commutative field.
