In spite of the growing observational evidence for dark matter and dark energy in the universe , their physical nature is largely unknown . In fact , several authors have proposed modifications of Newton ’ s law of gravity at cosmological scales to account for the apparent acceleration of the cosmic expansion . Inspired by such suggestions , we attempt to constrain possible deviations from Newtonian gravity by means of the clustering of SDSS ( Sloan Digital Sky Survey ) galaxies . To be specific , we assume a simple modification of Newton ’ s law with an additional Yukawa-type term characterized by the amplitude \alpha and the length scale \lambda . Adopting spatially-flat universes dominated by cold dark matter and/or dark energy , we solve a linear perturbation equation for the growth of density fluctuations . In particular , we find an exact analytic solution for the Einstein – de Sitter case . Following the Peacock-Dodds prescription , we compute the nonlinear power spectra of mass fluctuations , perform a statistical comparison with the SDSS galaxy data , and derive constraints in the \alpha - \lambda plane ; for instance , we obtain the constraints of -0.5 < \alpha < 0.6 and -0.8 < \alpha < 0.9 ( 99.7 % confidence level ) for \lambda = 5 h ^ { -1 } Mpc and 10 h ^ { -1 } Mpc , respectively . We also discuss several future possibilities for improving our analysis .