방금 컴퓨터에 Deb30 7.4데비안 7.4를 설치했습니다. 내가 파이썬 3.3.2 이상 내 내부 개발 python3-lxml 필요합니다. 파이썬 3.2가 debian wheezy의 python3.x 시리즈의 기본 라인이기 때문에 Ive는 3.4.0 파이썬 버전을 컴파일하고 이전 3.2 버전을 제거했습니다. (프로세스가 일부 그놈 종속성을 제거했음을 유의하십시오).Debian 7.4 - Python 3.4.0에서 LXML 컴파일에 실패했습니다
Python3 패키지 (예 : cherrypy)가 잘 설치되고 인터프리터 내에서 모듈을 성공적으로 가져올 수 있습니다.
python3-lxml을 설치하려고 할 때 시스템은 lxml 저장소 종속성 python3.2 ...을 설치해야합니다. 단지 원하지 않습니다.
그래서 파이썬 3.4.0에서 lxml을 컴파일하기로 결정했습니다.
종속성 설치 : * libxml2를가> = 2.7.8 * libxml2를-DEV * libxslt1 => = 1.1.26 * libxslt1-DEV
sudo apt-get install libxml2 libxml2-dev libxslt1 libxslt1-dev
내가 생각에만 * -dev 패키지 필요하지 않니?
[email protected]:~/Pack/lxml-3.3.4$ sudo python3 setup.py build
Building lxml version 3.3.4.
Building without Cython.
Using build configuration of libxslt 1.1.26
Building against libxml2/libxslt in the following directory: /usr/lib
/opt/python-3.4.0/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
running build
running build_py
copying src/lxml/includes/lxml-version.h -> build/lib.linux-x86_64-3.4/lxml/includes
running build_ext
building 'lxml.etree' extension
gcc -pthread -Wno-unused-result -Werror=declaration-after-statement -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/libxml2 -I/home/jeby6372/Pack/lxml-3.3.4/src/lxml/includes -I/opt/python-3.4.0/include/python3.4m -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-3.4/src/lxml/lxml.etree.o -w
gcc -pthread -shared build/temp.linux-x86_64-3.4/src/lxml/lxml.etree.o -L/usr/lib -lxslt -lexslt -lxml2 -lz -lm -o build/lib.linux-x86_64-3.4/lxml/etree.cpython-34m.so
/usr/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
-lz 옵션이 GCC에 의해 인식되지 않습니다
문제는 소스 디렉토리에서 컴파일하는 동안 나는이 문제에 직면한다는 것입니다. 정보를 얻으려면 다음을 사용하여 도구 체인을 설치했습니다.
sudo apt-get install build-essential
어떤 생각입니까?
미리 감사드립니다.