TITLE: Examples of spaces with only trivial vector bundles
QUESTION [14 upvotes]: This was originally posted on mathoverflow, but it seems it's more appropriate to post here.
Let $B$ be a paracompact space with the property that any (topological) vector bundle $E \to B$ is trivial. What are some non-trivial examples of such spaces, and are there any interesting properties that characterize them?
For simple known examples we of course have contractible spaces, as well as the 3-sphere $S^3$. This one follows from the fact that its rank $n$ vector bundles are classified by $\pi_3 (BO(n)) = \pi_2 (O(n)) = 0$. I'm primarily interested in the case where $B$ is a closed manifold. Do we know any other such examples?
There is this nice answer to a MSE question which talks about using the Whitehead tower of the appropriate classifying space to determine whether a bundle is trivial or not. This seems like a nice tool (of which I am not familiar with) to approaching this problem. As a secondary question, could I ask for some insight/references to this approach?
EDIT Now that we know from the answer all the examples for closed $3$-manifolds (integral homology spheres), I guess I can now update the question to the case of higher odd dimensions. Does there exist a higher dimensional example?

REPLY [16 votes]: Proposition: Suppose $B$ is a closed manifold for which every vector bundle over $B$ is trivial.  Then each of the following must be true:

$B$ must be orientable.
$B$ must be odd dimensional.
The first integral homology group must vanish.
$B$ must have the rational homology of a sphere.

Proof: $1.$  If $B$ is non-orientable, then the tangent bundle of $B$ is a non-trivial vector bundle.
$2.$  If $B$ is even dimensional (and orientable), then it has a map $f:B\rightarrow S^{\dim B}$ of degree $1$ (by collapsing everything outside of a small ball to a point.).  The tangent bundle to $S^{\dim B}$ has non-trivial Euler class, so the pull back along $f$ of this bundle to $B$ also has a non-trivial Euler class, hence is non-trivial.
$3.$  Assume $H_1(B)\neq 0$.  If $H_1(B)$ contains a torsion element, by Universal Coefficients, $H^2(B)$ contains a torsion element.  In particular, there is a non-trivial map $f:B\rightarrow \mathbb{C}P^\infty$.  Pulling back the tautological bundle over $\mathbb{C}P^\infty$ gives a vector bundle over $B$ whose Euler class is this torsion element.  So, this vector bundle is non-trivial.
Thus, we may assume $H_1(B)$ is torsion free.  This then implies $H^1(B;\mathbb{Z}/2\mathbb{Z})$ is non-trivial, so there is a non-trivial line bundle over $B$.
$4.$  We may assume $B$ is orientable and odd dimensional.  Assume $H_d(B;\mathbb{Q})\neq 0$ for some $0<d<\dim B$.  If $d$ is odd, then $\dim B-d$ is even, and Poincare duality and universal coefficients imply both $H^d(B;\mathbb{Q})$ and $H^{\dim B-d}(B;\mathbb{Q})$ are non-trivial.  From the appendix to this paper of Belegradek and Kapovitch, there is a vector bundle over $B$ with non-trivial Euler class in either degree $d$ or degree $\dim B-d$, whichever is even.  $\square$
In general, the above conditions are not sufficient.  For example, apart from dimension $7$, an odd dimensional sphere satisfy all the above conditions, but has non-trivial tangent bundle.  In dimension $7$, the $7$-sphere does admit other non-trivial vector bundles.  For example, $\pi_6(S^3)\cong \pi_6(SO(3))$ is non-trivial, so there are non-trivial rank $3$ bundles over $S^7$.
On the other hand, in dimension $3$, condition $3$ above is actually sufficient.
Proposition:  Suppose $B$ is a closed $3$-dimensional manifold with $H_1(B) = 0$.  Then all vector bundles over $B$ are trivial.
Proof.  Let $\xi$ be a vector bundle of rank $k$ over $B$.  Such a vector bundle is classified by a map $\phi:B\rightarrow BO(k)$.  Because $H_1(B) = 0$, $H^1(B;\mathbb{Z}/2\mathbb{Z}) = 0$.  Thus, $w_1(\xi) = 0$, so $\phi$ lifts to a map (still denoted by $\phi$) $\phi:B\rightarrow BSO(k)$.  Since $BSO(1)$ is a point, we may now assume $k\geq 2$.
Since $H_1(B) = 0$, $B$ must be orientable, so Poincare duality now implies that $H^2(B) = 0$.  Thus, if $k=2$, the Euler class vanishes, so the bundle is trivial.
Thus, we may assume $k\geq 3$.  Since $H^2(B) = 0$, it now follows that $H^2(B;\mathbb{Z}/2\mathbb{Z}) = 0$, so $w_2(\xi) = 0$.  This implies $\phi$ futher lifts to a map $\phi:B\rightarrow BSpin(k)$.  But for $k\geq 3$, $Spin(k)$ is $3$-connected.  It follows that $\phi$ is homotopically trivial, so $\xi$ is trivial. $\square$
Note that this proposition applies to $S^3$ and also the Poincare Dodecahedral Space, but also to many more spaces.  See, e.g., the answers and references to this MO post.
I do not know of a closed example other than those in dimension $3$.
EDIT
On the corresponding question on Mathoverflow,  I added an answer which contains another obstruction: if $M$ is a closed simply connected manifold which admits only trivial vector bundles, then either $\dim M = 3$ or $H^\ast(M)$ must contain non-trivial $2$-torsion.