Plesk

Upgrade to Plesk Obsidian or update between Obsidian releases fails: TypeError: an integer is required

Symptoms

The following error appear at the log after failed Plesk update or during upgrade to Plesk Obsidian:

Error: Cannot open file /var/cache/yum/x86_64/6/PLESK_17_PHP70/packages/plesk-php70-sodium-2.0.13-0centos.6.181207.1259.x86_64.rpm: [Errno 2] No such file or directory: '/var/cache/yum/x86_64/6/PLESK_17_PHP70/packages/plesk-php70-sodium-2.0.13-0centos.6.181207.1259.x86_64.rpm'
...
TypeError: an integer is required
error: python callback <bound method RPMTransaction.callback of <yum.rpmtrans.RPMTransaction instance at 0x6324e18>> failed, aborting!
processTransaction event: 10 (Downloading Packages)
processTransaction event: 11 (unknown)

Cause

Product issue:

  • #PPPM-11218 "On servers running an RPM-based Linux with Yum, it is no longer possible to run the yum clean all command during the update, which led to the update failing."

    Fixed in:

Resolution

Please consider updating your server:

Workaround

If update is not possible for some reason you may try the following

workaround

  1. Connect to the server via SSH

  2. Check for duplicate packages with the command below:

    # package-cleanup --dupes

    Note: package-cleanup utility is provided by yum-utils package. If the package is not installed use yum install yum-utilsto install it.

  3. Make sure that important packages will not be removed and then remove duplicates using the following method:

    Warning: It's highly advised to have a full server backup before proceed with further steps of this article.

    # package-cleanup --cleandupes

  4. Re-check duplicates:

    # package-cleanup --dupes

    • If any package still reported, remove it manually

      # rpm -e --nodeps --noscripts <package_name>

  5. Complete the upgrade:

    # plesk installer update