Rewritten to only attempt package install if running as root