Error while installing DBD::mysql module for perl on Ubuntu

Error message: “Can’t exec “mysql_config”: No such file or directory at Makefile.PL”

Solution:

sudo apt install libmysqlclient-dev

Now, retry installing:

sudo cpanm DBD::mysql