Can a gasoline engine operate in outer space?

No they can not operate in outer space.