In Sitecore 8+ you will encounter this error if the Sitecore instance is unable to connect to MongoDB. The following will usually be present throughout the logs:
Exception: System.NullReferenceExceptionMessage: Object reference not set to an instance of an object.Source: Sitecore.Analytics.MongoDB
Simply installing MongoDB and having it running (and configured correctly in the connection strings) will allow the package installer to complete installation as expected.