install_dependencies: check return value from apt-get and echo a message and exit if there's errors