Streamlined the detection and installation for required debian packages.