We derive the spectral properties of adjacency matrix of complex networks and of their Laplacian by the replica method combined with a dynamical population algorithm. By assuming the order parameter to be a product of Gaussian distributions, the present theory provides a solution for the non linear integral equations for the spectra density in random matrix theory of the spectra of sparse random matrices making a step forward with respect to the effective medium approximation (EMA) . We extend these results also to weighted networks with weight-degree correlations