WebFaction
Community site: login faq

Hi there

I'm on web11 and would like to install the latest uwsgi 0.9.7.2 into a virtualenv (runing python 2.7), but a simple pip install uwsgi -E /home2/<user>/<folder> is not working. At home (ubuntu) I needed to first install those: sudo apt-get install libxml2-dev build-essential python-dev. Now I'm not sure if I made some mistakes or I need some addition dependencies installed. Any tips where to go?

Here is the error message: pastebin

bye Marcel

asked 08 Apr '11, 12:47

marcel
671617
accept rate: 0%

edited 08 Apr '11, 14:04


I think the problem is that Web11 is a very old server - it runs RHEL 4, and the installed POSIX thread libraries on that machine aren't compatible with whatever uWSGI needs.

I just installed the latest uWSGI on one of our newer machines with the following commands...

mkdir ~/bin ~/lib/python2.7
easy_install-2.7 virtualenv pip
virtualenv --no-site-packages ~/uwsgi_test
source ~/uwsgi_test/bin/activate
pip install uwsgi

... and it installed successfully with no errors.

Upgrading the pthread libraries on Web11 would probably break a lot of stuff, so we have no plan to do that at this time. If you want to move to one of our newer machines, feel free to open a support ticket to get that ball rolling.

Hope that helps!

permanent link

answered 08 Apr '11, 17:59

seanf
12.2k42136
accept rate: 37%

Sean,

Can you comment on how your few command installation of uwsgi differs from the one on this post: http://community.webfaction.com/questions/143/uwsgi-for-better-performance-and-memory-usage This other post is how I would expect to set things up and is the same way I build my apache2/mod_wsgi setup.

The question that has been rolling around in my head is that uwsgi needs to be behind nginx. The person who did that post installed their own nginx, which means they are going nginx to nginx/uwsgi If your installation really works with django then you can use the webfaction nginx to work with uwsgi is this correct? Can you straighten me out....

Thanks.

(28 Jun '11, 21:34) dak

Rails, Django, and other similar applications are actually structured equivalently to the "Custom Application (listening on port)" internally. That means that the WebFaction front-end Nginx server simply uses a ProxyPass directive to forward requests to the user's local server. That's why Django has a mod_wsgi stack on Apache, and explains why one would generally use that or a local Nginx+uwsgi stack. You can't just "use uwsgi" on the WebFaction front-end Nginx server; that won't work because it's just ProxyPass-ing the request on to another port for the real service.

This question is fundamentally different from the one you referenced. However, that one is more likely to be what you're looking for. This question was more focused on the virtualenv itself. At the end of the day, there still needs to be some HTTP server that Nginx proxies to, whether that be Apache, Nginx, paster, or any other python-based small HTTP server.

(28 Jun '11, 22:46) ryans ♦♦

Understood. I recognized that the other post was probably going to be the real setup root. I just wanted to make sure I was not missing something.

(28 Jun '11, 23:03) dak

I was migrated to a new server (web215) but still get that error when compiling uwsgi: xmlconf.c:9:27: error: libxml/parser.h: No such file or directory

Are the newer servers meant to have libxml2-dev installed?

(08 Feb '12, 19:53) Baron

libxml2-devel is already available on your server, and the files are located in /usr/include/libxml2 . The above file specifically is located at /usr/include/libxml2/libxml/parser.h

When compiling from source, you may need something like: CFLAGS="-I/usr/include/libxml2 $CFLAGS"

or, alternatively, the C_INCLUDE_PATH environment variable for GCC (described here): C_INCLUDE_PATH="/usr/include/libxml2:$C_INCLUDE_PATH"

I haven't been able to reproduce this yet, but if I am able to, I can update this comment with a more copy-paste-friendly answer.

(09 Feb '12, 00:53) ryans ♦♦
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:

×103
×17
×7
×1

question asked: 08 Apr '11, 12:47

question was seen: 6,350 times

last updated: 09 Feb '12, 00:53

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 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