Only explicitely specify the apt package manager on debian and ubuntu platforms

Adds compatibility for non-apt platforms.