Running the binaries packed with Pivotal Web Server fails with the error: No such file or directory
search cancel

Running the binaries packed with Pivotal Web Server fails with the error: No such file or directory

book

Article ID: 293950

calendar_today

Updated On:

Products

Pivotal Web Server

Issue/Introduction

You are unable to run the binaries that are packed with Pivotal Web Server (PWS). Directly executing the binaries that are packaged with ERS or vFWS fails and you see errors related to missing libraries. Specifically, PWS reports the error:
$ cd httpd-2.2/bin/
$ ./httpd.worker -V
./httpd.worker: error while loading shared libraries: libexpat.so.1: cannot open shared object file: No such file or directory

PWS is packaged in such a way that it can be deployed on any path. After extracting the files, you can run the fixrootpath.pl script, which ensures that the references in the scripts point to appropriate product deliverables based on where the product is extracted.

However, binary library links cannot be patched in a similar way. Therefore, library paths are specified in helper scripts with environment variables. But, when you execute binaries outside the helper scripts, these variables are not specified and the product libraries that are dependent on the binaries cannot be found.

Resolution

To resolve this issue, you can use the scripts provided to set the necessary variables. For PWS, run the following command:
$ . httpd-2.2/bin/envvars
Note: Ensure that there is a period followed by a space and then the script.

In Windows installations, you can use a .bat version of these scripts, which can be run at the command line.

For example:
> tools/bin/tools-env.bat

After running the script to set the necessary variables, you should be able to execute the binaries as expected.

For example:
$ httpd-2.2/bin/httpd.worker -v
Server version: Apache/2.2.19 (Unix)
Server built:   Jun 29 2011 17:42:35

If the issue persists, run the fixrootpath.pl script after extracting the product files.