WebFaction
Community site: login faq

Hi there!

I tried to install xapian using the following commands:

xapian core?

  • ./configure --prefix=$HOME
  • make
  • ?make install

??xapian-bindings - ./configure --prefix=$HOME PYTHON=/usr/local/bin/python2.6 PYTHON_LIB=$HOME/lib/python2.6 --with-python --without-ruby --without-tcl?
- make - make install

But I get the following error:

/usr/bin/install: cannot create regular file /usr/local/lib/python2.6/site-packages/xapian.py': Permission denied /usr/bin/install -c -m 644 'xapian.pyc' '/usr/local/lib/python2.6/site-packages/xapian.pyc' /usr/bin/install: cannot create regular file/usr/local/lib/python2.6/site-packages/xapian.pyc': Permission denied

And suggestions how to correctly install xapian?

Thanks in advance!

asked 22 Oct '10, 13:23

niklas1080
16126
accept rate: 0%


I'm not sure what you did wrong, but if you start over and install Xapian and its Python bindings with the following commands you should have no problems:

mkdir -p ~/bin ~/src ~/lib/python2.6
cd ~/src
wget http://oligarchy.co.uk/xapian/1.2.3/xapian-core-1.2.3.tar.gz
tar zxf xapian-core-1.2.3.tar.gz
cd xapian-core-1.2.3
./configure --prefix=$HOME
make
make install
cd ..
wget http://oligarchy.co.uk/xapian/1.2.3/xapian-bindings-1.2.3.tar.gz
tar zxf xapian-bindings-1.2.3.tar.gz
cd xapian-bindings-1.2.3
./configure --prefix=$HOME \
PYTHON=/usr/local/bin/python2.6 \
PYTHON_LIB=$HOME/lib/python2.6 \
--with-python --without-ruby \
--without-php --without-tcl
make
make install

Hope that helps!

permanent link

answered 22 Oct '10, 16:45

seanf
12.2k41936
accept rate: 37%

edited 22 Oct '10, 16:46

Thanks for your quick response! Worked perfectly for me!

(23 Oct '10, 04:54) niklas1080

this worked great for me too! thank you!

(02 Nov '11, 23:28) germanjoey

If I have already tried installing xapian using some other method and failed, do I first need to uninstall that before trying the above method?

I tried the above method which seems to work except syncing my db produces the following error:

File "/home/findconx/webapps/django/findconx/haystack/backends/xapian_backend.py", line 29, in <module>
    raise MissingDependency("The 'xapian' backend requires the installation of 'xapian'. Please refer to the documentation.")
haystack.exceptions.MissingDependency: The 'xapian' backend requires the installation of 'xapian'. Please refer to the documentation.
(16 Oct '12, 15:28) Roland

You don't need to start over entirely.

The above instructions set up Xapian for Python 2.6, but your Django apps are using Python 2.7.

To fix your installation, re-install the bindings using Python 2.7, eg:

./configure --prefix=$HOME \
PYTHON=/usr/local/bin/python2.7 \
PYTHON_LIB=$HOME/lib/python2.7 \
--with-python --without-ruby \
--without-php --without-tcl
make
make install

Hope that helps!

(16 Oct '12, 16:15) seanf

Hi Seanf

A few month back I could install easily xapian on my webfaction account (web334), but now using make for the bindings it fails with

PYTHONPATH="xapian:$PYTHONPATH" /usr/local/bin/python2.6 -c "import _xapian" Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: libxapian.so.15: cannot open shared object file: No such file or directory <<<

Any clue what I can do? Xapian itself worked, installed everything with --prefix=$HOME

(12 Oct '13, 14:21) marcel

Please open a ticket at our support site and we'll help you find the cause of the issue.

(12 Oct '13, 15:31) timg ♦♦

btw. webfaction found the solution. an old dynamic library file (.so) was in my python path ~/lib/python2.6/ and with simple removing it I could compile the xapian python bindings flawless.

thanks webfaction, ya rock!

(13 Oct '13, 04:19) marcel

I get this error in the logs I subsituted 2.6 with 2.7 from the instructions

    [Thu Nov 12 15:18:27.951311 2015] [wsgi:error] [pid 180734:tid 139675802625792] [remote 127.0.0.1:192] mod_wsgi (pid=180734): Exception occurred processing WSGI script '/home/kbuzz/webapps/revised/kb/kb/wsgi.py'.
[Thu Nov 12 15:18:27.951383 2015] [wsgi:error] [pid 180734:tid 139675802625792] [remote 127.0.0.1:192] Traceback (most recent call last):
[Thu Nov 12 15:18:27.951413 2015] [wsgi:error] [pid 180734:tid 139675802625792] [remote 127.0.0.1:192]   File "/home/kbuzz/lib/python2.7/django/core/handlers/wsgi.py", line 175, in __call__
[Thu Nov 12 15:18:27.951457 2015] [wsgi:error] [pid 180734:tid 139675802625792] [remote 127.0.0.1:192]     signals.request_started.send(sender=self.__class__)
[Thu Nov 12 15:18:27.951475 2015] [wsgi:error] [pid 180734:tid 139675802625792] [remote 127.0.0.1:192]   File "/home/kbuzz/lib/python2.7/django/dispatch/dispatcher.py", line 198, in send
[Thu Nov 12 15:18:27.951502 2015] [wsgi:error] [pid 180734:tid 139675802625792] [remote 127.0.0.1:192]     response = receiver(signal=self, sender=sender, **named)
[Thu Nov 12 15:18:27.951519 2015] [wsgi:error] [pid 180734:tid 139675802625792] [remote 127.0.0.1:192]   File "/home/kbuzz/lib/python2.7/haystack/__init__.py", line 59, in reset_search_queries
[Thu Nov 12 15:18:27.951545 2015] [wsgi:error] [pid 180734:tid 139675802625792] [remote 127.0.0.1:192]     for conn in connections.all():
[Thu Nov 12 15:18:27.951561 2015] [wsgi:error] [pid 180734:tid 139675802625792] [remote 127.0.0.1:192]   File "/home/kbuzz/lib/python2.7/haystack/utils/loading.py", line 112, in all
[Thu Nov 12 15:18:27.951585 2015] [wsgi:error] [pid 180734:tid 139675802625792] [remote 127.0.0.1:192]     return [self[alias] for alias in self.connections_info]
[Thu Nov 12 15:18:27.951600 2015] [wsgi:error] [pid 180734:tid 139675802625792] [remote 127.0.0.1:192]   File "/home/kbuzz/lib/python2.7/haystack/utils/loading.py", line 100, in __getitem__
[Thu Nov 12 15:18:27.951624 2015] [wsgi:error] [pid 180734:tid 139675802625792] [remote 127.0.0.1:192]     self._connections[key] = load_backend(self.connections_info[key]['ENGINE'])(using=key)
[Thu Nov 12 15:18:27.951639 2015] [wsgi:error] [pid 180734:tid 139675802625792] [remote 127.0.0.1:192]   File "/home/kbuzz/lib/python2.7/haystack/utils/loading.py", line 53, in load_backend
[Thu Nov 12 15:18:27.951662 2015] [wsgi:error] [pid 180734:tid 139675802625792] [remote 127.0.0.1:192]     return import_class(full_backend_path)
[Thu Nov 12 15:18:27.951677 2015] [wsgi:error] [pid 180734:tid 139675802625792] [remote 127.0.0.1:192]   File "/home/kbuzz/lib/python2.7/haystack/utils/loading.py", line 23, in import_class
[Thu Nov 12 15:18:27.951700 2015] [wsgi:error] [pid 180734:tid 139675802625792] [remote 127.0.0.1:192]     raise ImportError("The Python module '%s' has no '%s' class." % (module_path, class_name))
[Thu Nov 12 15:18:27.951727 2015] [wsgi:error] [pid 180734:tid 139675802625792] [remote 127.0.0.1:192] ImportError: The Python module 'xapian_backend' has no 'XapianEngine' class.
(12 Nov '15, 12:21) six_wars

According to this stackoverflow question, this would be caused by a non-existent or misconfigured HAYSTACK_CONNECTIONS setting. It can happen even after xapian is installed correctly.

(14 Nov '15, 01:16) ryans ♦♦
showing 5 of 9 show 4 more comments
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×113
×44
×2

question asked: 22 Oct '10, 13:23

question was seen: 7,101 times

last updated: 14 Nov '15, 01:16

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM