Installing CloudPanel for managing web hosting environments is usually a straightforward process. However, in some cases, users may encounter installation errors caused by missing system dependencies. These issues can be frustrating, especially when the error messages are vague or misleading, just like it happened in my case, where I was unable to determine the cause of the failure initially with the logs of installation.
In this article, I'll walk you through how to identify and install the missing packages that commonly cause installation failures. Whether you're setting up CloudPanel on a fresh Ubuntu server or troubleshooting a failed attempt, this guide will help you resolve dependency-related errors and get your CloudPanel instance up and running smoothly.
How I determined the cause of the failure
As I mentioned, the logs of the installation of CloudPanel didn't help me that much; the error wasn't pointed out, so I didn't have a lot of options.
There was an important detail, though. The installation of CloudPanel succeeded in a fresh installation of Ubuntu 24.04 in my favorite server provider, Akamai Linode, but with a provider of this company, I was working for, they used a minimal version of Ubuntu 24.04, so I suspected that the problem could be related to missing packages.
In Ubuntu, you can list all the installed packages with the following command and get the output as a simple list:
dpkg -l | awk '/^ii/ { print $2 }'
I did the same thing on both servers (the one where CloudPanel installation failed) and the server where it works without any problem. After this, I identified that several packages were missing in the minimal installation, which was the issue during the installation of CloudPanel.
How to fix it
In my case, the problem was that the Ubuntu installation was so minimal that it lacked the following components (stuff that CloudPanel doesn't check before proceeding with the installation and therefore fails). I recommend you set up a fresh Ubuntu installation (the one with the problem) and then install the missing packages that, in my case, were the following:
# Update package index and upgrade all packages
sudo apt update && sudo apt -y upgrade
# Install common utilities
sudo apt -y install curl wget sudo
# Install default MTA (Mail Transport Agent)
sudo apt -y install default-mta
# Install AppArmor (for security)
sudo apt -y install apparmor
# Install useful build and software tools
sudo apt -y install apt-transport-https software-properties-common build-essential gnupg2 lsb-release unzip
After finishing the installation of the previous packages, try the installation once again, and it should succeed this time. Just in case that it fails as well, I recommend you follow the same steps that I did, listing all of the packages that are currently installed in a server that has the same OS that you're using, but where the installation of CloudPanel succeeds, and install the missing packages.
Happy coding ❤️!