Unable to load dynamic library 'timezonedb.so'

RUn this

$ cd ~
$ apt-get install libmagickwand-dev pkg-config build-essential lsphp81-dev
$ wget -O timezonedb.tar.gz https://github.com/php/pecl-datetime-timezonedb/archive/refs/tags/RELEASE_2022_7.tar.gz
$ tar vxzf timezonedb.tar.gz
$ cd pecl-datetime-timezonedb-RELEASE_2022_7
$ sh rebuild.sh # this runs phpize && ./configure && make clean && make
$ make install
$ echo "extension=timezonedb.so" >> /usr/local/lsws/lsphp81/etc/php/8.1/mods-available/01-timezonedb.ini
$ touch /usr/local/lsws/admin/tmp/.lsphp_restart.txt
$ systemctl restart lsws
$ ls /usr/local/lsws/lsphp81/lib/php/20210902/
# do you see timezonedb.so

I assume you are running ubuntu from the color of your terminal

1 Like