Has anyone managed to build php5-xapian on Ubuntu 12.04?

Posted by jetboy on Server Fault See other posts from Server Fault or by jetboy
Published on 2012-05-19T23:08:59Z Indexed on 2012/06/28 21:18 UTC
Read the original article Hit count: 324

Filed under:
|

As Xapian's been dropped from the Ubuntu repositories, I'm attempting to build my own .deb from the instructions here:

http://article.gmane.org/gmane.comp.search.xapian.general/8855

http://beeznest.wordpress.com/2011/07/06/howto-build-your-own-binaries-of-php-xapian-bindings-for-debian/

I can only get things to progress beyond the first few seconds by leaving out 'rm debian/control', but if I do, it looks as if the Python and Ruby bindings are building and passing their versions of smoketest correctly.

However, the PHP part of the build is failing with this error:

/home/charlie/xapian-bindings-1.2.8/php/smoketest.php:38: include(xapian.php): failed to open stream: No such file or directory
FAIL: smoketest.php

There's a xapian.php file in /home/charlie/xapian-bindings-1.2.8/php/php5/ but if I copy it to /home/charlie/xapian-bindings-1.2.8/php/ or change the path to it in smoketest.php, the build fails right near the start with:

dpkg-source: error: aborting due to unexpected upstream changes

Unfortunately I'm out of my comfort zone building from source. Anyone got any ideas?

Edit post James' answer:

Builds fine if I follow instructions exactly. I built it on a test VM initially, but that didn't build the PHP package as PHP itself wasn't installed. Obvious gotcha, but worth mentioning.

Installing generated the following error:

Setting up php5-xapian (1.2.8-1) ...
Processing triggers for libapache2-mod-php5 ...
dpkg (subprocess): unable to execute installed post-installation script (/var/lib/dpkg/info/libapache2-mod-php5.postinst): Permission denied                                                               ssion denied
dpkg: error processing libapache2-mod-php5 (--install):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 libapache2-mod-php5

It's only a script for restarting Apache. Stopping Apache before running sudo dpkg -i php5-xapian_*.deb prevents the error. Xapian now shows up in phpinfo(). Job done. Thanks.

© Server Fault or respective owner

Related posts about ubuntu

Related posts about xapian