How to set up the driver for an HP all-in-one printer/scanner on CentOS 7 Linux?
First, install these packages and it may ask you to download and install other plugins. Without these packages, my printer does work.
# yum install hplip hplip-gui hpijs
Second, install plugins for the HP printer.
Then you can try to install the printer again: