Skip to Content
Menu
This question has been flagged
1 Reply
42301 Views

ubuntu 16.04 ,  

sudo apt-get install -y python-dev libxml2-dev libxml2 libxslt-dev libpq-dev libldap2-dev libsasl2-dev libevent-dev  #安装开发相关的库
sudo apt-get install -y libjpeg8-dev libpng12-dev libfreetype6-dev zlib1g-dev libwebp-dev libtiff5-dev libopenjpeg-dev libzip-dev  #安装Pillow依赖包
sudo apt-get install -y python-babel python-dateutil python-decorator python-docutils python-feedparser python-imaging
sudo apt-get install -y python-jinja2 python-ldap python-libxslt1 python-lxml python-mako python-mock python-openid
sudo apt-get install -y python-passlib python-psutil python-psycopg2 python-pychart python-pydot python-pyparsing
sudo apt-get install -y python-pypdf python-reportlab python-requests python-suds python-tz python-vatnumber python-vobject
sudo apt-get install -y python-werkzeug python-xlsxwriter python-xlwt python-yaml python-gevent
sudo apt-get install -y python-pip #安装pip,如果系统未安装


x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DPSUTIL_VERSION=431 -I/usr/include/python2.7 -c psutil/_psutil_linux.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_linux.o

  x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/psutil/_psutil_linux.o -o build/lib.linux-x86_64-2.7/psutil/_psutil_linux.so

  /usr/local/bin/ld: this linker was not configured to use sysroots

  collect2: error: ld returned 1 exit status

  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1


  ----------------------------------------

  Failed building wheel for psutil

  Running setup.py clean for psutil

  Running setup.py bdist_wheel for psycopg2 ... error

  Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-c23zWr/psycopg2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpYWaNKdpip-wheel- --python-tag cp27:

  running bdist_wheel

  running build


``````


/usr/local/bin/ld: this linker was not configured to use sysroots

  collect2: error: ld returned 1 exit status

  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1


  ----------------------------------------

  Failed building wheel for psycopg2

  Running setup.py clean for psycopg2

  Running setup.py bdist_wheel for python-ldap ... error


Failed building wheel for python-ldap


running build_ext

    building 'lxml.etree' extension

    creating build/temp.linux-x86_64-2.7

    creating build/temp.linux-x86_64-2.7/src

    creating build/temp.linux-x86_64-2.7/src/lxml

    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/libxml2 -Isrc/lxml/includes -I/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w

    x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.linux-x86_64-2.7/lxml/etree.so

    /usr/local/bin/ld: this linker was not configured to use sysroots

    collect2: error: ld returned 1 exit status

    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1


    ----------------------------------------

  Rolling back uninstall of lxml Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-c23zWr/lxml/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-9AcfMG-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-c23zWr/lxml/



pip list 

root@vagrant:/home/good# pip list DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.

Babel (2.3.4)

beautifulsoup4 (4.4.1)

bzr (2.7.0)

Chameleon (2.24)

chardet (2.3.0)

configobj (5.0.6)

cryptography (1.2.3)

Cython (0.25.2)

decorator (4.0.10)

distribute (0.6.14)

docutils (0.12)

docxtpl (0.3.5)

ecdsa (0.13)

enum34 (1.1.2)

feedparser (5.1.3)

funcsigs (0.4)

gevent (1.1.0)

greenlet (0.4.9)

gyp (0.1)

html5lib (0.999)

httplib2 (0.9.1)

idna (2.0)

ipaddress (1.0.16)

Jinja2 (2.8)

keyring (7.3)

launchpadlib (1.10.3)

lazr.restfulclient (0.13.4)

lazr.uri (1.0.3)

linecache2 (1.0.0)

lptools (0.2.0)

lxml (3.7.3)

Mako (1.0.3)

MarkupSafe (0.23)

mock (1.3.0)

ndg-httpsclient (0.4.0)

numpy (1.12.1)

oauth (1.0.1)

odoo (10.0.post20170601)

ofxparse (0.16)

paramiko (1.16.0)

passlib (1.6.5)

pbr (1.8.0)

pdfkit (0.6.1)

pdftools (0.37)

Pillow (3.1.2)

pip (9.0.1)

psutil (3.4.2)

psycogreen (1.0)

psycopg2 (2.6.1)

pyasn1 (0.1.9)

PyChart (1.39)

pycrypto (2.6.1)

pydot (1.0.29)

Pygments (2.1)

pygobject (3.20.0)

pygpgme (0.3)

pyinotify (0.9.6)

pyOpenSSL (0.15.1)

pyparsing (2.0.3)

pyPdf (1.13)

Pyrex (0.9.8.5)

pyserial (3.0.1)

pystan (2.15.0.1)

python-dateutil (2.4.2)

python-docx (0.8.6)

python-ldap (2.4.22)

Python-OOXML (0.13)

python-openid (2.2.5)

python-stdnum (1.2)

pytz (2016.7)

pyusb (1.0.0b2)

PyWebDAV (0.9.8)

pyxdg (0.25)

PyYAML (3.11)

reportlab (3.3.0)

requests (2.11.1)

roman (2.0.0)

SecretStorage (2.1.3)

setuptools (36.0.0)

simplejson (3.8.1)

six (1.10.0)

suds-jurko (0.7.dev0)

traceback2 (1.4.0)

unittest2 (1.1.0)

urllib3 (1.13.1)

uTidylib (0.2)

vatnumber (1.2)

vobject (0.8.1rc0)

wadllib (1.3.2)

Werkzeug (0.10.4)

wheel (0.29.0)

xlrd (1.0.0)

XlsxWriter (0.7.3)

xlutils (2.0.0)

xlwt (0.7.5)

zope.interface (4.1.3)

ZSI (2.1a1)


Lxml has been installed, but can not pass 。

Avatar
Discard
Best Answer

Hi Patrick,

It seems installing order is not proper. Please uninstall everything and install it again.  I hope that will solve your problem.

Thanks

Chandran nepolean

Avatar
Discard
Related Posts Replies Views Activity
2
Nov 24
25098
2
May 24
5524
3
Mar 24
4964
0
Mar 24
264
3
Feb 24
11421