In this paper, we investigate optimal linear approximations (n-approximation numbers ) of the embeddings from the Sobolev spaces Hr(r>0) for various equivalent norms and the Gevrey type spaces Gα,β(α,β>0) on the sphere Sd and on the ball Bd, where the approximation error is measured in the L2-norm. We obtain preasymptotics, asymptotics, and strong equivalences of the above approximation numbers as a function in n and the dimension d. We emphasis that all equivalence constants in the above preasymptotics and asymptotics are independent of the dimension d and n. As a consequence we obtain that for the absolute error criterion the approximation problems Id:Hr→L2 are weakly tractable if and only if r>1, not uniformly weakly tractable, and do not suffer from the curse of dimensionality. We also prove that for any α,β>0, the approximation problems Id:Gα,β→L2 are uniformly weakly tractable, not polynomially tractable, and quasi-polynomially tractable if and only if α≥1.