We study inflationary universes with an SU(3) gauge field coupled to an inflaton through a gauge kinetic function. Although the SU(3) gauge field grows at the initial stage of inflation due to the interaction with the inflaton, nonlinear self-couplings in the kinetic term of the gauge field become significant and cause nontrivial dynamics after sufficient growth. We investigate the evolution of the SU(3) gauge field numerically and reveal attractor solutions in the Bianchi type I spacetime. In general cases where all the components of the SU(3) gauge field have the same magnitude initially, they all tend to decay eventually because of the nonlinear self-couplings. Therefore, the cosmic no-hair conjecture generically holds in a mathematical sense. Practically, however, the anisotropy can be generated transiently in the early universe, even for an isotropic initial condition. Moreover, we find particular cases for which several components of the SU(3) gauge field survive against the nonlinear self-couplings. It occurs due to flat directions in the potential of a gauge field for Lie groups whose rank is higher than one. Thus, an SU(2) gauge field has a specialty among general non-Abelian gauge fields.