I've successfully installed Loris on Debian "Jessie" 8 following the installation instructions. But it didn't went smoothly: I encountered several errors along the way. I posted my experience on Twitter and @azaroth42 asked me to drop this here.
This is a quick 'n dirty step by step list of actions I performed to get Loris running.
Setup
I'm doing this in a Vagrant/Virtualbox setup with some basic provisioning from Ansible (git, etc.) I use this vagrant box as the image I'm starting off: a vanilla Debian "Jessie" 8.
I ended up with Python 2.7.9 on the Bash prompt.
Step by step installation.
After installation. Logged in with the vagrant user:
The original command in the README points out to install libjpeg-turbo8-dev. But that package doesn't exist in Debian 8. Change this to libjpeg62-turbo-dev
Moving on:
sudo pip uninstall Pillow
I tried reïnstalling Pillow via pip, but I don't get the output mentioned in the README. Just a plain "Okay, I installed the binary for you" statement. I do get the mentioned output when I run setup.py later on.
Moving on to setup.py. I don't change anything to the configuration in etc/loris2.conf. Everything works just fine by default out of the box.
sudo python setup.py install
Now, here I do encounter 3 nasty errors.
Error 1
Package libffi was not found in the pkg-config search path.
fatal error: ffi.h: No such file or directory
This one is caused by a missing apt dependency:
sudo apt-get install libffi-dev
Error 1
Setup script exited with error in cryptography setup command: Invalid environment marker: python_version < '3'
ExpiresActive On
ExpiresDefault "access plus 5184000 seconds"
AllowEncodedSlashes On
WSGIDaemonProcess loris2 user=loris group=loris processes=10 threads=15 maximum-requests=10000
WSGIScriptAlias /loris /var/www/loris2/loris2.wsgi
WSGIProcessGroup loris2
Okay, now we can reload Apache2. First we need to enable 2 modules. The Headers module, which is mentioned in the README... and the wsgi module, which is not mentioned in the README!
So, let's check out sudo tail /var/log/apache2/error.log which will tell you something like this:
ile "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 105, in <module>
SSL_ST_INIT = lib.SSL_ST_INIT
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'
Solution: `sudo pip install --upgrade pyOpenSSL``
Again, it just reinstalls both cryptography 2.1.4 and pyOpenSSL 0.14... and that solves the errors.
Reload apache2 once more for good measure: sudo service apache2 reload
navigate to http://server/loris, you should now see the Loris welcome message:
This is Loris, an image server that implements the IIIF Image API Level 2. See
<http://iiif.io/api/image/2.0/> for details and <https://github.com/loris-imageserver/loris>
for the source code and implementation details.
TL;DR: I tried installing Loris on Debian Jessie with Python 2.7.9. I encountered a few annoying Python dependency messages. And a few minor differences in DEB package dependencies compared to Ubuntu/Debian 6/7.
I've successfully installed Loris on Debian "Jessie" 8 following the installation instructions. But it didn't went smoothly: I encountered several errors along the way. I posted my experience on Twitter and @azaroth42 asked me to drop this here.
This is a quick 'n dirty step by step list of actions I performed to get Loris running.
Setup
I'm doing this in a Vagrant/Virtualbox setup with some basic provisioning from Ansible (git, etc.) I use this vagrant box as the image I'm starting off: a vanilla Debian "Jessie" 8.
I ended up with Python 2.7.9 on the Bash prompt.
Step by step installation.
After installation. Logged in with the
vagrant
user:First, install some basics:
Let's install Workzeug:
Moving on to Pillow:
The original command in the README points out to install libjpeg-turbo8-dev. But that package doesn't exist in Debian 8. Change this to libjpeg62-turbo-dev
Moving on:
I tried reïnstalling Pillow via pip, but I don't get the output mentioned in the README. Just a plain "Okay, I installed the binary for you" statement. I do get the mentioned output when I run
setup.py
later on.Moving on to setup.py. I don't change anything to the configuration in
etc/loris2.conf
. Everything works just fine by default out of the box.Now, here I do encounter 3 nasty errors.
Error 1
This one is caused by a missing apt dependency:
Error 1
I solved this one by doing this:
Oddly enough, the upgrade seems to just reinstall the same version of setuptools. But that does solve the marker problem...
Error 3
Same issue: reinstall configobj solves this error:
For each error, you need to re-run
setup.py
. If you solved all three errors, setup.py should exit without errors and you can move in with the setup.virtualenv in wsgi:
sudo nano /var/www/loris2/loris2.wsgi
Now add these lines:
Apache configuration:
sudo nano /etc/apache2/sites-available/000-default.conf
Okay, now we can reload Apache2. First we need to enable 2 modules. The Headers module, which is mentioned in the README... and the wsgi module, which is not mentioned in the README!
navigate to http://server/loris => You'll get an "Internal server error"
So, let's check out
sudo tail /var/log/apache2/error.log
which will tell you something like this:Solution: `sudo pip install --upgrade pyOpenSSL``
Again, it just reinstalls both cryptography 2.1.4 and pyOpenSSL 0.14... and that solves the errors.
Reload apache2 once more for good measure:
sudo service apache2 reload
navigate to http://server/loris, you should now see the Loris welcome message:
TL;DR: I tried installing Loris on Debian Jessie with Python 2.7.9. I encountered a few annoying Python dependency messages. And a few minor differences in DEB package dependencies compared to Ubuntu/Debian 6/7.