Created
February 3, 2016 03:49
-
-
Save eevmanu/62b8a3304288d4104813 to your computer and use it in GitHub Desktop.
Solution when cannot build lxml package for installation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This problems happens because there is no enough space to compile 'lxml' package, | |
because it needs 1gb of RAM, so we are going to create a swap area to skip this error and | |
fake like we have more RAM | |
First, be sure you're out of memory | |
dmesg | tail | |
And see if you have packages needed installed | |
dpkg --get-selections | grep -v deinstall > ~/packages | |
cat ~/packages | grep {each package} | |
- libxml2 | |
- libxslt1.1 | |
- libxml2-dev | |
- libxslt1-dev | |
- python-libxml2 | |
- python-libxslt1 | |
- python-dev | |
- python-setuptools | |
- lxml | |
1 install some packages | |
sudo apt-get install \ | |
libxml2 \ | |
libxslt1.1 \ | |
libxml2-dev \ | |
libxslt1-dev \ | |
python-libxml2 \ | |
python-libxslt1 \ | |
python-dev \ | |
python-setuptools | |
2 create swap area | |
sudo dd if=/dev/zero of=/swapfile bs=1024 count=524288 | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
3 install lxml, use sudo if is needed | |
pip install lxml | |
4 when you're done, turn off swap | |
sudo swapoff /swapfile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment