libicui18n.so.42: cannot open shared object file while enabling multiple PHP versions in Parallels Plesk for Linux

One of our projects needed an old php version on a Linux box running plesk. So, I used the instructions from Parallels Documentation.

During the compilation steps, I saw some errors which are listed below along with the solution:

Errors

/usr/local/src/php5520/sapi/cli/php: error while loading shared libraries: libicui18n.so.42: cannot open shared object file: No such file or directory
make: *** [ext/phar/phar.php] Error 127

Resolution:

Find missing libraries and create a soft link for them in /usr/lib64

find / -iname libicui18n.so*
ln -s /usr/local/icu40/lib/libicui18n.so.42 /usr/lib64/
ln -s /usr/local/icu40/lib/libicuuc.so.42 /usr/lib64/
ln -s /usr/local/icu40/lib/libicudata.so.42 /usr/lib64/
ln -s /usr/local/icu40/lib/libicuio.so.42 /usr/lib64/
make

Compile PHP

./configure '--with-icu-dir=/usr/local/icu40' '--with-libdir=lib64' '--cache-file=../config.cache' '--prefix=/usr/local/php5520-cgi' '--with-config-file-path=/usr/local/php5520-cgi/etc' '--disable-debug' '--with-pic' '--disable-rpath' '--with-bz2' '--with-curl' '--with-freetype-dir=/usr/local/php5520-cgi' '--with-png-dir=/usr/local/php5520-cgi' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr/local/php5520-cgi' '--with-openssl' '--with-pspell' '--with-pcre-regex' '--with-zlib' '--enable-exif' '--enable-ftp' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-wddx' '--with-kerberos' '--with-unixODBC=/usr' '--enable-shmop' '--enable-calendar' '--without-sqlite3' '--with-libxml-dir=/usr/local/php5520-cgi' '--enable-pcntl' '--with-imap' '--with-imap-ssl' '--enable-mbstring' '--enable-mbregex' '--with-gd' '--enable-bcmath' '--with-xmlrpc' '--with-ldap' '--with-ldap-sasl' '--with-mysql=/usr' '--with-mysqli' '--with-snmp' '--enable-soap' '--with-xsl' '--enable-xmlreader' '--enable-xmlwriter' '--enable-pdo' '--with-pdo-mysql' '--with-pdo-pgsql' '--with-pear=/usr/local/php5520-cgi/pear' '--enable-intl' '--without-pdo-sqlite' '--with-config-file-scan-dir=/usr/local/php5520-cgi/php.d' '--enable-fastcgi' && make

Enable this new PHP binary:

/usr/local/psa/bin/php_handler --add -displayname php-5.5.20 -path /usr/local/php5520-cgi/bin/php-cgi -phpini /usr/local/php5520-cgi/etc/php.ini -type fastcgi -id php5520