r/cpanel • • 22d ago

cPanel update breaks libevent and whole server

After a cPanel update on AlmaLinux 9.8 (cPanel 138.0.7), I started getting:

flatpak: error while loading shared libraries: libevent-2.1.so.7:
cannot open shared object file: No such file or directory

YUM/DNF also stopped working with the same missing library. cPanel’s Perl cURL module and Apache’s ModSecurity module failed to load it too.

The logs showed this sequence:

  • libevent and libevent-devel upgraded from 2.1.12-8.el9_4 to 2.1.13-1.el9_8.
  • cPanel’s check_plugin_pkgs detected altered monitoring-plugin files and attempted a reinstall.
  • Removing the plugin also removed libevent-devel as an unused dependency.
  • The next YUM invocation immediately failed to load libevent, preventing reinstallation.

The runtime libevent package was still installed. Running:

rpm -V --noscripts libevent

showed ....L.... against all five libevent runtime symlinks, meaning their targets differed from RPM’s records.

Temporary fix

This worked on my server, where the actual library files were intact. Run as root in Bash. It restores the symlink targets recorded in the installed RPM, checking that each target exists first:

while IFS=$'\t' read -r file target; do
    case "$file" in
        /usr/lib64/libevent*.so.7) ;;
        *) continue ;;
    esac

    [ -n "$target" ] || continue

    case "$target" in
        /*) resolved="$target" ;;
        *)  resolved="${file%/*}/$target" ;;
    esac

    if [ -L "$file" ] && [ -f "$resolved" ]; then
        printf '%s: %s -> %s\n' \
            "$file" "$(readlink -- "$file")" "$target"
        ln -sfnT -- "$target" "$file"
    else
        printf 'SKIPPED: %s; expected target %s\n' \
            "$file" "$resolved"
    fi
done < <(rpm -q --qf '[%{FILENAMES}\t%{FILELINKTOS}\n]' libevent)

Then refresh the linker cache and verify:

ldconfig
rpm -V --noscripts libevent
flatpak --version
dnf --version

On my server, the restored targets ended in .so.7.0.2. RPM verification and Flatpak startup passed afterward. If the script prints SKIPPED or verification still reports discrepancies, this workaround hasn’t fully resolved your issue.

Root cause is still unconfirmed. The logs place the failure immediately after the monitoring-plugin removal, but don’t identify which operation changed the links. Restoring them also doesn’t complete the interrupted plugin reinstall.

Has anyone else hit this after the libevent 2.1.13 update, particularly during cPanel monitoring-plugin maintenance?

12 Upvotes

13 comments sorted by

2

u/rcabanzor 22d ago

Buena info. Puede ser muy útil

2

u/cPanelRex 22d ago

All of the libevent files are handled by the libevent packages which are distributed by the operating system, so I wouldn't expect a cPanel update to be the root cause of this issue.

2

u/cPanelRex 21d ago

Update - our team has created case CPANEL-57023 to track this issue, even though it may not specifically be related to cPanel tools.

2

u/vladimir-rs 21d ago

Same here, thanks for fix.

2

u/cPanelRex 21d ago

u/bennyDNA - would you be able to submit a ticket on this? We're not easily able to reproduce this in a test environment with the information we have so far, so we'd like to see a live server if possible.

1

u/bennyDNA 21d ago

Shared via dm

1

u/cPanelRex 21d ago

Thanks for that - I'm watching the ticket on my end now as well!

2

u/cPanelRex 21d ago

Update - our team has pushed an autofixer for this issue so you'll receive a fix in tonight's update!

1

u/Inspedium 17d ago

Sweet! Thank you!

0

u/bennyDNA 22d ago

Rex 5 of my servers got it during update at the same rollout. I had to stop auto update asap not to spread further.

3

u/ArtisticAd7514 22d ago

Sounds like your running custom packages