A boiler at a glue-making factory in eastern Pakistan exploded on Friday, killing at least 18 people and injuring 21 others.