Correctly handle sudo during install to ensure system libraries installed