Getting a dependency failed error while installing Percona-server-server

I was trying to install Percona Server following the steps provided in the official Percona documentation. However, I encountered an error while performing the final step.

The error message indicated a failed dependency job for mysql.service. The MySQL service, which is a part of the Percona Server, could not start. The system logs provided more details about the issue, suggesting that the mysql.service job failed due to a dependency problem.

In addition to this, I found that the percona-server-server package was either broken or not fully installed. When I tried to reconfigure the package using the dpkg-reconfigure command, it returned an error.

I’m looking for help to resolve these issues and successfully install the Percona Server."

Hi @Arpi_P and welcome to Percona community,

Can you provide us with more information. What documentation page you were following? OS version? What error are you seeing? What dependencies are being pointed out? Installation errors? Any errors reported by journalctl…

Thanks,
K.

Hey @kedarpercona, Thanks for the quick response.
Since I m a new user I couldn’t post much links, the page I followed to install was Use APT repositories - Percona Server for MySQL and my OS version is ubuntu 20.04.6.

I was able to fix the issue by running following commads

  1. Identify Percona Packages: apt list --installed | grep percona - This command lists all installed packages and filters for those related to Percona.
  2. Remove Specific Packages: The following commands remove specific Percona-related packages:
  • apt remove percona-xtrabackup-80
  • apt remove percona-toolkit
  • apt remove percona-server-common
  • apt remove percona-server-client
  • apt remove percona-release
  1. Update Package List: apt-get update - This command updates the list of available packages and their versions.
    4. Remove Percona Source Lists: rm -rf /etc/apt/sources.list.d/percona-* - This command removes all Percona-related source list files.

After cleaning up properly I followed the steps from Use APT repositories - Percona Server for MySQL, and I came across one more error,
The error message N: Download is performed unsandboxed as root as file '/root/percona-release_latest.generic_all.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)

so I had to run

sudo chown -Rv _apt:root /var/cache/apt/archives/partial/ - This command changes the ownership of the directory to the _apt user and root group
and
sudo chmod -Rv 700 /var/cache/apt/archives/partial/ - This command sets the permissions of the directory such that only the owner can read, write, and execute files in the directory.

After this I was able to install Percona-server-server.

Not sure if this was best approach but please do let me know if there is a better way to do it.
Thank You