A medium can carry a longitudinal wave because it has the property of
Mass
Density
Compressibility
Elasticity
A medium should have elasticity to travel a longitudinal wave.