Reorder installation to respect prerequisites