2013-02-28 6 views
1

link 다음에 boost.python을 빌드하려고합니다.Boost.Python을 빌드 할 수 없습니다.

/home/kchaitanya/boost/boost_1_50_0/tools/build/v2/user-config.jam

using python : 2.6 : /usr/bin/python2.6 : /usr/include/python2.6 : /usr/lib/python2.6 : <python-debugging>on ;

: 내가 ./b2 또는 ./bjam를 사용하여 컴파일 할 때, 나는 점점 오전 오류 같은 :이 라인을 추가 할 때

error: No best alternative for /python_for_extensions 
next alternative: required properties: <python>2.6 <target-os>linux 
    matched 
next alternative: required properties: <python>2.6 <target-os>linux 
    matched 

오류가 사라

그러나 지금 컴파일 할 때 컴파일 타임에 오류가 발생합니다. 의 헤더 파일을 찾을 수 없습니다. 오류의 그냥 작은 발췌입니다

...patience... 
...patience... 
...found 1548 targets... 
...updating 62 targets... 
gcc.compile.c++ bin.v2/libs/python/build/gcc-4.1.2/release/link-static/threading multi/numeric.o 

In file included from ./boost/python/detail/prefix.hpp:13, 
      from ./boost/python/numeric.hpp:8, 
      from libs/python/src/numeric.cpp:6: 
./boost/python/detail/wrap_python.hpp:50:23: error: pyconfig.h: No such file or directory 
./boost/python/detail/wrap_python.hpp:75:24: error: patchlevel.h: No such file or directory 
./boost/python/detail/wrap_python.hpp:78:2: error: #error Python 2.2 or higher is required for 
./boost/python/detail/wrap_python.hpp:142:21: error: Python.h: No such file or directory 
./boost/python/instance_holder.hpp:34: error: ‘PyObject’ has not been declared 
./boost/python/instance_holder.hpp:41: error: expected ‘;’ before ‘(’ token 
./boost/python/instance_holder.hpp:45: error: ‘PyObject’ has not been declared 
./boost/python/detail/wrapper_base.hpp:21: error: expected initializer before ‘*’ token 
./boost/python/detail/wrapper_base.hpp:23: error: expected initializer before ‘*’ token 

이 boost.python 구축에 도움이 필요합니다.

+0

하지만를 설치? – Chaitanya

+0

'python-devel'을 설치하려고했습니다. 그러나 그것은 내 문제를 해결하지 못한다. 다시 이전과 동일한 오류가 발생합니다. – Chaitanya

답변

3

내 파이썬 버전에 해당하는 python-devel 또는 python-dev 패키지를 설치하지 못했습니다. 내 경우

는 그렇게

sudo yum install python26-devel가 속임수를 썼는지 python2.6했다.

+0

sudo yum install -y python27-devel, 또한 python2.7을 시도했습니다. pthon-2.7이 모두 같은 메시지를 보냈습니다. 패키지 python-2.7-devel을 사용할 수 없습니다. 내 redhat에 7. 그것을 찾으려고 : yum search python | grep -i devel : http://stackoverflow.com/questions/23215535/how-to-install-python27-devel-on-centos-6-5 –

1

내 프로젝트에서 비슷한 문제가 있었지만 이상은 도움이되지 않습니다. 나는 파이썬과 크로스 컴파일을하고 있었고, 나를 위해 실제 문제는 '파이썬을 사용하여 :'구성 (하나는 project-config.jam에 있었고, bootstrap.sh/bat 실행 다음에 복사했다. 또 다른 파이썬은 스스로를 user-config.jam으로 설정한다.) 여기 http://comments.gmane.org/gmane.comp.lib.boost.build/22088

과 :

이 솔루션

여기에 설명 된 사실 파이썬은 이미 내 시스템의 오른쪽 https://groups.google.com/forum/#!topic/boost-developers-archive/namMFSO_6Rg

관련 문제