I have problems installing lxml on my virtual machine, cloud server, Ubuntu 14.04.2 with 512MB RAM. For people that are going through this, I will document little steps of problems that occurred on the path.
First I didn't install requirements, so make sure you have that installed. Can be found here.
Then I had some problems with memory, because 512MB were insufficient. Excellent post on how to extend your RAMS with swap can be found here.
Now I'm facing new problem. While trying to execute sudo pip install lxml.
In pip.log I've found this messsage:
/usr/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Is it some "z" module that I'm missing? What am I supposed to do?