tmux: error while loading shared libraries: libevent-2.0.so.5

As @guiverc commented - both tmux and libevent are well-packaged on Ubuntu Bionic Beaver 18.04 LTS (and other versions).

You should remove locally-installed tmux with one of the following methods:

  • Check version of locally-installed tmux:

    tmux -V # or from `man tmux`
    

    Then clone this version from its github repository, compile it again and run

    sudo make uninstall
    
  • Simply remove your self-installed tmux with

    sudo rm $(which tmux)
    

    Note: running sudo rm $(which tmux) looks safe because of the fact that even official package do not have shipped other binaries or libraries.

And install package from repository:

sudo apt-get install tmux

Tmux under Bionic (18.04) requires a later version of libevent (2.1) than you mention (https://packages.ubuntu.com/bionic/tmux). I asked "where did you get your tmux as it doesn't match the bionic version of tmux" noting your version does match the requirements for xenial's tmux (https://packages.ubuntu.com/xenial/tmux) suggesting check your

apt-cache policy tmux

You then told me you installed it yourself, meaning you (possibly unwittingly or unknowingly) agreed to maintain it yourself as apt packaging doesn't know about it & thus can't maintain-upgrade it. Thus you need to manage the upgrades yourself (as you didn't install the auto-maintained version).

Your two main choices I see are :-

(1) you need to recompile for your existing installation (following the instructions in the documented you used the first time, eg. make; make install..) as your prior compile was done for Ubuntu 16.04 and not 18.04.

(2) remove it, and install the Ubuntu one using normal apt tools. This has the advantage of always having automatic security updates, plus will be updated in future release-upgrades (even if this is 20.04) See @N0rbert's answer & thread's comments for clues as to removal

[these notes were comments converted to an answer]