Compiling on Debian Wheezy

If you do a minimal net install of Debian Wheezy and go to compile OLS on it, you will find that it won't work.

You need to install the below (at the minimum)

aptitude install libssl-dev make automake build-essentials g++ libpcre3 libpcre3-dev libexpat1-dev libgeoip-dev libcurl4-openssl-dev libbz2-dev libjpeg8-dev libpng-dev libfreetype6-dev libmagickwand-dev
to get it and PHP to compile.

If you want imagemagick and geoip installed for php, you will need to do a
/usr/local/lsws/lsphp5/bin/pecl install imagick
/usr/local/lsws/lsphp5/bin/pecl install geoip
and then add
in your php.ini file (which you will also need to copy from /usr/local/lsws/php to /usr/local/lsws/lsphp5/lib.

If you run into a problem that your site doesn't show up, you need to issue
/usr/local/lsws/fcgi-bin/lsphp5 -i
and check for any errors. What I've been having show up is
PHP Fatal error:  Directive 'allow_call_time_pass_reference' is no longer available in PHP in Unknown on line 0
, which can be resolved by commenting it out of your php.ini. Once I did that my sites came up running fine.
Last edited:

Tracy Perry

Active Member
On the required list, replace build-essentials with build-essential (drop the s). I would have edited the original post but cannot due to time expiration.
Also need to add libmcrypt-dev to the build essentials apt-get list.
@Slavik, if you could edit the original post this one can be deleted.
Last edited:
OpenLiteSpeed 1.2.9 will compile on Ubuntu 14.04 with the same process as Debian, but you WILL need to do some slight mods.

Even though Ubuntu uses base Debian code, I found that OpenLiteSpeed would NOT compile on it. Even with the correct libraries installed (which the Debian listed are correct) I ended up getting
collect2: error: ld returned 1 exit status
make[3]: *** [openlitespeed] Error 1
make[3]: Leaving directory `/home/tracy/work/openlitespeed-1.2.9/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/tracy/work/openlitespeed-1.2.9/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/tracy/work/openlitespeed-1.2.9/src'
make: *** [all-recursive] Error 1

This was solved by going into the (for version 1.2.9) /openlitespeed-1.2.9/src directory and editing the Makefile and finding
If you notice, there is nothing designated for that.... and therein lay the problem. You will need to modify the Makefile (and be SURE it's the one in the /src directory) to
Once you do that you can do the standard Debian install routine of
  • sudo ./configure --with-group=nogroup
  • sudo make && sudo make install