Articles in this section

Plesk and its command-line utilities do not work due to missing Plesk packages

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux

Symptoms

  • Plesk is not accessible in a web browser with a "404 Not found nginx" error or a blank page.

  • Plesk command-line utilities are unavailable:

    # plesk -v
    plesk: command not found

    or Plesk version cannot be retrieved:

    # plesk -v
    open /usr/local/psa/version: no such file or directory

  • The plesk-core package is missing on the server:

    • on CentOS/RHEL-based distributions:

      # rpm -qa | grep plesk-core

    • on Debian/Ubuntu-based distributions:

      # apt list --installed | grep plesk-core

Cause

Plesk installation is corrupted because the Plesk packages have been removed. System package manager logs may indicate that Plesk packages have been removed recently:

  • on CentOS/RHEL-based distributions:

    # grep Erased /var/log/yum.log | grep 'psa\|plesk'
    Nov 01 10:00:00 Erased: psa-firewall-17.8.11-cos7.build1708180301.19.x86_64
    Nov 01 10:00:00 Erased: psa-updates-17.8.11-cos7.build1708180326.12.noarch
    Nov 01 10:00:00 Erased: plesk-core-17.8.11-cos7.build1708180301.19.x86_64
    <...>

  • on Debian/Ubuntu-based distributions:

    # grep remove /var/log/dpkg.log | grep 'psa\|plesk'
    2018-01-01 10:00:00 remove psa-mnemo:all 4.2.14-debian8.0.build1708180425.15 <none>
    2018-01-01 10:00:00 remove psa-updates:all 17.8.11-debian8.0.build1708180326.12 <none>
    2018-01-01 10:00:00 remove plesk-core:amd64 17.8.11-debian8.0.build1708180301.19 <none>
    <...>

This may happen::
- if a Plesk or system package update was interrupted by a system reboot or forced stopping of update-related processes
- during dist-upgrade
- when Plesk packages were partially removed by mistake

Resolution

  1. Connect to the Plesk server via SSH.

  2. Check if Plesk database exists using the command:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin psa

    • if it exists and you are connected to psa database:

      CONFIG_TEXT: MariaDB [psa]>

      then move to step 3.

    • if you get the error message:

      CONFIG_TEXT: ERROR 1049 (42000): Unknown database 'psa'

      restore the Plesk database from the latest daily dump:

      # zcat /var/lib/psa/dumps/mysql.daily.dump.0.gz | sed -n '/-- Current Database: `psa`/,/-- Current Database:*/p' | MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin

  3. Download Plesk Installer:

    # wget http://autoinstall.plesk.com/plesk-installer

  4. Make the file executable:

    # chmod +x plesk-installer

  5. Start Plesk Installer and install the missing packages:

    # ./plesk-installer

  6. Proceed with the installation.

  7. On Debian/Ubuntu-based distributions, re-link Plesk installation directory using these commands:

    # unlink /usr/local/psa

    # rm -rf /usr/local/psa

    # ln -s /opt/psa /usr/local/psa

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.