The invention relates to a method for producing hydrocarbides, characterised in that it comprises at least the foliowing steps: a) anaerobic fermentation of a fermentable raw material in order to produce volatile fatty acids, b) elongation of the volatile fatty acids produced in step a) by fermentation with at least one bacterium of the Megasphaera genus, extraction of the fatty acids produced from the fermentation must, and c) production of hydrocarbides by subjecting the fatty acids produced in step b) to a Kolbe electrolysis.