The interior structure of the Sun can be studied with great accuracy using observations of its oscillations, similar to seismology of the Earth. Precise agreement between helioseismological measurements and predictions of theoretical solar models has been a triumph of modern astrophysics. A recent downward revision by 25-35 per cent of the solar abundances of light elements such as C, N, O and Ne (ref. 2) has, however, broken this accordance: models adopting the new abundances incorrectly predict the depth of the convection zone, the depth profiles of sound speed and density, and the helium abundance. The discrepancies are far beyond the uncertainties in either the data or the model predictions. Here we report neon-to-oxygen ratios measured in a sample of nearby solar-like stars, using their X-ray spectra. The abundance ratios are all very similar and substantially larger than the recently revised solar value. The neon abundance in the Sun is quite poorly determined. If the Ne/O abundance in these stars is adopted for the Sun, the models are brought back into agreement with helioseismology measurements.