use DEBIAN_FRONTEND and don't use sudo