Was trying to use mytop on one of my servers today, and got the error message:
Can’t locate Term/ReadKey.pm in @INC
This server is using cPanel/CloudLinux and this is what I have done to fix this problem:
- I ran: #yum whatprovides “perl(Term::ReadKey)” to find out the yum package that contains the perl module. I use yum whenever possible instead of compiling from source. Below is the result:perl-TermReadKey-2.30-13.el6.x86_64 : A perl module for simple terminal control
Repo : cloudlinux-x86_64-server-6
Other : perl(Term::ReadKey)
- Next I ran: #yum install perl-TermReadKey-2.30-13.el6.x86_64 and then ran #mytop to see if it works.
- Bummer, now I get the error message:
install_driver(mysql) failed: Can’t locate DBD/mysql.pm in @INC
- So I ran: #yum whatprovides perl-DBD-MySQL and with the result provide I ran:
#yum whatprovides perl-DBD-MySQL . This will install perl(DBD:MySQL) on the server.
- Next I run #mytop again, it will display some error message complaining that it cannot connect to the database “test” with some default settings. You can either set up the test database with the connection details provided, or you can add your own ~/.mytop configurations.