error while loading shared libraries: libsfml-system.so.2.4

For Ubuntu 18.04 LTS you have to install the relevant package with this library

sudo apt-get install libsfml-system2.4

and other similar libraries using

sudo apt-get install libsfml-window2.4 libsfml-graphics2.4 libsfml-audio2.4

or install all of them including development headers by

sudo apt-get install libsfml-dev

On newer Ubuntu versions (starting from 20.04 LTS) you have to download deb-packages from 18.04 LTS repository of such libraries manually by

cd ~/Downloads
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/libs/libsfml/libsfml-audio2.4_2.4.2+dfsg-4_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/libs/libsfml/libsfml-graphics2.4_2.4.2+dfsg-4_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/libs/libsfml/libsfml-network2.4_2.4.2+dfsg-4_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/libs/libsfml/libsfml-system2.4_2.4.2+dfsg-4_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/libs/libsfml/libsfml-window2.4_2.4.2+dfsg-4_amd64.deb

sudo apt-get install ./libsfml*.deb

and then enjoy the game.