2. If the equation $\frac{x+7}{x-1}+\frac{1}{x}-\frac{4 x+k}{x^{2}-x}=0$ has only one real root (counting repeated roots as one). Then the value of $k$ is ( ).
(A) -5
(B) -1 or 4
(C) -5 or -1
(D) -5 or -1 or 4
2. (I)).

The original equation can be transformed into $x^{2}+4 x-(k+1)=0$.
By $\Delta=16+4(k+1)=0$, we get $k=-5$. Therefore, when $k=-5$, the roots of the original equation are $x=-2$.

When $k>-5$, equation (1) has two equal real roots. According to the problem, one of the roots must be an extraneous root of the original equation. If the extraneous root is $x=0$, substituting into (1) yields $k=-1$, at this time the other root $x=-4$ is a root of the original equation; if the extraneous root is $x=1$, substituting into (1) yields $k=4$, at this time the original equation has only one root $x=-5$. Hence, the values of $k$ are $-5, -1, 4$.