The absolute electron capture cross sections for single and double charge exchanges between the highly charged ions O6+ and CO2, CH4, H2, N2, the dominant collision processes in the solar wind, have been measured in the energy from 7 keV*q (2.63 keV/u) to 52 keV*q (19.5 keV/u). These measurements were carried out in the new experimental instrument set up at Fudan University, and the error of cross sections for single and double charge exchanges at the 1{sigma} confidence level are about 11% and 16%, respectively. Limited agreement is achieved with single electron capture results calculated by the classical over-barrier model. These cross sections data are useful for simulation ion-neutral processes in astrophysical environments and to improve the present theoretical model of fundamental atomic processes.