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

suphp-0.7.2 configure: error: cannot find install-sh, 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, 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 http://www.suphp.org/download/suphp-0.7.1.tar.gz; 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:

JAVA_HOME and JAVA_CMD image

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/java-wrappers.sh if the file exists – which actually existed.
Continue reading “[warning] /usr/bin/freemind: No java runtime was found”

Vagrant: The forwarded port to 8080 is already in use on the host machine.

I was trying to spin up a vagrant box while another box was already running. I did configure

config.vm.network :forwarded_port, guest: 80, host: 8082

but was getting
Vagrant port forwarding Issue

Continue reading “Vagrant: The forwarded port to 8080 is already in use on the host machine.”