We usually face issues in our Linux VPS or Dedicated servers and Detected an installer lock file (/root/installer.lock) is one of the most command error occur when you trying to install cPanel/WHM panel on Linux servers. This error comes when your previous installation is interrupted for any reasons like Connectivity Loss, Hardware issue , Invalid commands and there many be other reasons as well.
How to fix Detected an Installer Lock File ?
There is a simple way to fix this error, you just have to remove /root/installer.lock but before removing make sure your error is similar to this code..
Detected an installer lock file (/root/installer.lock). Please be sure that an installer is not already running.
You can remove this file and re-runthe cpanel install once you’re certain another installation isn’t in progress
Now to remove installer.lock file from your server you need to run this command and restart your VPS or Dedicated server services from your dashboard.
rm -rf /root/installer.lock
You no longer see this error and to install cPanel installation run sh latest as you already downloaded cPanel package from the server.