First let me state a Theorem due to Kazdan and Warner:

``Let M be a compact two dimensional orientable manifold. Let $f: M \rightarrow \mathbb{R}$ be a function that has the same sign as $\chi(M)$, the Euler characteristic of $M$ at some point. Then $M$ admits a metric $g$ such that the Gaussian curvature $K$ is the given function $f$. ''

(I am actually not sure if orientable is necessary). Is anything known about the following question:

``Let M be a compact, orientable manifold. Let $f: M \rightarrow \mathbb{R}$ be a function that has the same sign as $\chi(M)$, the Euler characteristic of $M$ at some point. Then does $M$ admit a metric $g$ such that $$ *e(TM) = f $$ where $e(TM)$ is the Euler class of the Tangent bundle and * is the Hodge star operator?''

Notice that in two dimensions this is precisely the Kazdan Warner theorem, since $$*e(TM) = \frac{K}{2 \pi}$$