All posts by Nitin 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:


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


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

find / -iname*
ln -s /usr/local/icu40/lib/ /usr/lib64/
ln -s /usr/local/icu40/lib/ /usr/lib64/
ln -s /usr/local/icu40/lib/ /usr/lib64/
ln -s /usr/local/icu40/lib/ /usr/lib64/

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

suphp-0.7.2 configure: error: cannot find install-sh,, or shtool in config “.”/config

Error is present only in suphp-0.7.2 even after installing the pre-requisites so assuming that it’s an issue with the build.
configure: error: cannot find install-sh,, or shtool in config "."/config

suphp-0.7.1 works fine
yum -y install gcc gcc-c++ httpd-devel; yum-complete-transaction
cd /usr/local/src/ && wget -c; tar -zxf suphp-0.7.1.tar.gz && cd suphp-0.7.1 && chown -R mysql. . && sudo -u mysql sh -c "make clean; make distclean; ./configure --with-apr=/usr/bin/apr-1-config --with-apache-user=apache && make && make check" && make install

[warning] /usr/bin/freemind: No java runtime was found

I tried firing up freemind on my Ubuntu 12.04 machine and it gave:

theos:$ freemind
[warning] /usr/bin/freemind: No java runtime was found
[error] /usr/bin/freemind: Unable to find an appropriate java runtime. See java_wrappers(7) for help

I’d configured the $JAVA_HOME and $JAVA_CMD variable and checked symbolic link for default java:


Symbolic link to default Java

Opened up the /usr/bin/freemind and saw that there was a function findjava which should have worked as I already have $JAVA_HOME and $JAVA_CMD as environment variables.
Going through the file, reached line: 151 and saw that there was a condition to source /usr/lib/java-wrappers/ if the file exists – which actually existed.
Continue reading [warning] /usr/bin/freemind: No java runtime was found