lxml installation error ubuntu 14.04 (internal compiler error)

后端 未结 5 521
-上瘾入骨i
-上瘾入骨i 2020-12-04 07:17

I am having problems with installing lxml. I have tried the solutions of the relative questions in this site and other sites but could not fix the problem. Need

相关标签:
5条回答
  • 2020-12-04 07:57

    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
    
    0 讨论(0)
  • 2020-12-04 07:59

    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

    0 讨论(0)
  • 2020-12-04 08:00

    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

    0 讨论(0)
  • 2020-12-04 08:07

    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.

    0 讨论(0)
  • 2020-12-04 08:08

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

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

    0 讨论(0)
提交回复
热议问题