polybar: error while loading shared libraries: libjsoncpp.so.21: cannot open shared object file: No such file or directory

Describe the issue

Updated to the latest version using yay

What actually happens Whenever I try to launch, I get this error message : error while loading shared libraries: libjsoncpp.so.21: cannot open shared object file: No such file or directory

Environment:

  • WM: I3
  • Distro: Arch
  • Output of polybar -vvv: error while loading shared libraries: libjsoncpp.so.21: cannot open shared object file: No such file or directory

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 25 (6 by maintainers)

Most upvoted comments

this is caused by jsoncpp upgrade. just rebuild the polybar.

if you’re on arch this should help no matter what aur helper you’re using:

# change to polybar-git if you're using polybar-git package
git clone https://aur.archlinux.org/polybar.git
cd polybar && makepkg -si

oh, yeah, if you’re using prebuilt polybar binary provided by a some package, then it must be rebuilt by package maintainer i guess…

Even worse if there are other programs out there that also rely on libjsoncpp.so.24 and would otherwise break, but now use an incompatible libjsoncpp.so.25

i had this problem today after updating my system. then, i removed it sudo pacman -R polybar and installed it from AUR yay -S polybar-git . It solved the problem!!!

I got this issue again. But I managed to “fix” it with a very easy symlink: ln -s /lib/libjsoncpp.so.25 /lib/libjsoncpp.so.24

add path to your env

export LD_LIBRARY_PATH=/usr/local/lib64