lxml installation error ubuntu 14.04 (internal compiler error)

╄→尐↘猪︶ㄣ 提交于 2019-11-27 16:59:28

In this particular case, it has nothing to do with dependencies, it's a memory problem.

I had this problem within a virtualbox VM. My solution was to increase memory allocated to the VM from the default 512Mb to 1024Mb.

Possible solution (if you have no ability to increase memory on that machine) is to add swap file.

sudo dd if=/dev/zero of=/swapfile bs=1024 count=524288
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile

from https://github.com/pydata/pandas/issues/1880#issuecomment-9920484

This worked for me on smallest digital ocean machine

Drake Guan

Refer to https://stackoverflow.com/a/6504860/261718

Go install some dev packages before pip install lxml

apt-get install libxml2-dev libxslt1-dev python-dev

Using digitalocean smallest machine you can just turn off mysql and apache while compiling using

sudo service apache2 stop
sudo service mysql stop

and after installing lxml turn them on again using this commands with 'start' instead of 'stop'. Works pretty well for me without using swap file

If @Drake answer does not work for you try adding lib1g-dev.

$ sudo apt-get install -y libxml2-dev libxslt1-dev zlib1g-dev

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!