After installing the DHL Shipping module for Magento 2, this (or a similar) error occurs:

PHP Fatal error: Interface [...] not found

PHP Fatal error: Uncaught Error: Class [...] not found

Source class [...] for [...] generation does not exist


The required library lib-shipping-mx has not been installed together with the DHL Shipping module.

For the installation in Magento 2, it does not suffice to only copy the files of the DHL Shipping module into the Magento directory.


Install the DHL Shipping module as explained in the in section "Installation instructions". This way, the required library will be installed.

When installing the module with Composer, the library will automatically be installed.