[ckan-dev] Install CKAN on Ubuntu 13.04

Hendrik Bunke bunke.hendrik at gmail.com
Tue Jul 9 11:30:52 UTC 2013


--On 2013-07-09 00:50, Reinoud Bosch wrote:
> Has anyone installed CKAN on Ubuntu 13.04? If so, do you have installation notes?
> 
> As a newbie I have been trying very hard the last couple of days, but I keep running into problems. Below is what I tried and some of the issues I ran into. Thanks for any help.
> 
> 
> sudo su
> apt-get install -y nginx apache2 libapache2-mod-wsgi libpq5
> wget http://packaging.ckan.org/python-ckan-2.0_amd64.deb
> dpkg -i python-ckan-2.0_amd64.deb
> apt-get install -y postgresql solr-jetty openjdk-6-jdk
> gedit /etc/default/jetty
>    NO_START=0
>    JETTY_HOST=127.0.0.1
>    JETTY_PORT=8983
> mv /etc/solr/conf/schema.xml   /etc/solr/conf/schema.xml.bak
> ln -s /usr/lib/ckan/default/src/ckan/ckan/config/solr/schema-2.0.xml   /etc/solr/conf/schema.xml
> service jetty start
> sudo -u postgres createuser -S -D -R -P ckan_default [password]
> sudo -u postgres createdb -O ckan_default ckan_default -E utf-8
> 
> # at this point I miss production.ini, so I do the following:
> 
> apt-get install python-pastescript
> easy_install -U Pylons
> cd /usr/lib/ckan/default/src/ckan
> paster make-config ckan /etc/ckan/default/production.ini
> gedit /etc/ckan/default/production.ini
>    sqlalchemy.url = postgresql://ckan_default:[password]@localhost/ckan_default
>    solr_url= http://127.0.0.1:8983/solr
> 
> # now things go awry, I try:
> 
> sudo ckan db init
> 
> # and get the message
> 
> from _sre import MAXREPEAT
> ImportError: cannot import name MAXREPEAT
> # I have found a way to work around this:
> 
> gedit /usr/lib/ckan/default/lib/python2.7/sre_constants.py
>    # from _sre import MAXREPEAT
>    MAXREPEAT = 65535
> gedit /usr/lib/ckan/default/lib/python2.7/sre_parse.py
>    # from _sre import MAXREPEAT
>    MAXREPEAT = 65535
> gedit /usr/lib/ckan/default/lib/python2.7/sre_compile.py
>    # from _sre import MAXREPEAT
>    MAXREPEAT = 65535
> 
> # at this point I again try
> 
> sudo ckan db init
> 
> # and I now get the message:
> 
> ImportError: No module named _csv
> 
> # this is where I currently give up.
> 
> Does anybody know what I should do? Thank you.

Hi,

the MAXREPEAT error indicates that the system Python and the
Python of the virtualenv of CKAN do not have the same version
number.  Ubuntu 13.04 uses 2.7.4. I'm not quite sure how to fix
this in case of package install. With source install you could
just create a new virtualenv. It might be possible to simply
overwrite /usr/lib/ckan/default with a new virtualenv.

regards
hendrik



-- 
Dr. Hendrik Bunke
http://gplus.to/hbunke
http://twitter.com/hbunke
http://www.hbxt.org




More information about the ckan-dev mailing list