在编译libxml2-2.9.1时报下列错误
make[4]: *** [libxml.lo] 错误 1
make[4]: Leaving directory `/usr/src/libxml2-2.9.1/python'make[3]: *** [all-recursive] 错误 1make[3]: Leaving directory `/usr/src/libxml2-2.9.1/python'make[2]: *** [all] 错误 2make[2]: Leaving directory `/usr/src/libxml2-2.9.1/python'make[1]: *** [all-recursive] 错误 1make[1]: Leaving directory `/usr/src/libxml2-2.9.1'make: *** [all] 错误 2解决方法:
查看python-devel包是否安装
[root@localhost libxml2-2.9.1]# rpm -q python-develpackage python-devel is not installed安装python-devel软件包
[root@localhost libxml2-2.9.1]# yum -y install python-develLoaded plugins: product-id, refresh-packagekit, security, subscription-managerThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.Setting up Install ProcessResolving Dependencies--> Running transaction check---> Package python-devel.x86_64 0:2.6.6-51.el6 will be installed--> Finished Dependency ResolutionDependencies Resolved
=============================================================================================================================================================
Package Arch Version Repository Size=============================================================================================================================================================Installing: python-devel x86_64 2.6.6-51.el6 RHEL 171 kTransaction Summary
=============================================================================================================================================================Install 1 Package(s)Total download size: 171 k
Installed size: 456 kDownloading Packages:Running rpm_check_debugRunning Transaction TestTransaction Test SucceededRunning Transaction Installing : python-devel-2.6.6-51.el6.x86_64 1/1 Verifying : python-devel-2.6.6-51.el6.x86_64 1/1Installed:
python-devel.x86_64 0:2.6.6-51.el6Complete!
重新进行编译
[root@localhost libxml2-2.9.1]# make
make all-recursivemake[1]: Entering directory `/usr/src/libxml2-2.9.1'Making all in includemake[2]: Entering directory `/usr/src/libxml2-2.9.1/include'Making all in libxmlmake[3]: Entering directory `/usr/src/libxml2-2.9.1/include/libxml'make[3]: Nothing to be done for `all'.make[3]: Leaving directory `/usr/src/libxml2-2.9.1/include/libxml'make[3]: Entering directory `/usr/src/libxml2-2.9.1/include'make[3]: Nothing to be done for `all-am'.make[3]: Leaving directory `/usr/src/libxml2-2.9.1/include'make[2]: Leaving directory `/usr/src/libxml2-2.9.1/include'Making all in .make[2]: Entering directory `/usr/src/libxml2-2.9.1'make[2]: Leaving directory `/usr/src/libxml2-2.9.1'Making all in docmake[2]: Entering directory `/usr/src/libxml2-2.9.1/doc'Making all in .make[3]: Entering directory `/usr/src/libxml2-2.9.1/doc'make[3]: Nothing to be done for `all-am'.make[3]: Leaving directory `/usr/src/libxml2-2.9.1/doc'Making all in devhelpmake[3]: Entering directory `/usr/src/libxml2-2.9.1/doc/devhelp'make[3]: Nothing to be done for `all'.make[3]: Leaving directory `/usr/src/libxml2-2.9.1/doc/devhelp'Making all in examplesmake[3]: Entering directory `/usr/src/libxml2-2.9.1/doc/examples'make[3]: Nothing to be done for `all'.make[3]: Leaving directory `/usr/src/libxml2-2.9.1/doc/examples'make[2]: Leaving directory `/usr/src/libxml2-2.9.1/doc'Making all in examplemake[2]: Entering directory `/usr/src/libxml2-2.9.1/example'make[2]: Nothing to be done for `all'.make[2]: Leaving directory `/usr/src/libxml2-2.9.1/example'Making all in xstcmake[2]: Entering directory `/usr/src/libxml2-2.9.1/xstc'make[2]: Nothing to be done for `all'.make[2]: Leaving directory `/usr/src/libxml2-2.9.1/xstc'Making all in pythonmake[2]: Entering directory `/usr/src/libxml2-2.9.1/python'make all-recursivemake[3]: Entering directory `/usr/src/libxml2-2.9.1/python'Making all in .make[4]: Entering directory `/usr/src/libxml2-2.9.1/python' CC libxml.lolibxml.c: In function 'libxml_xmlFreeTextReader':libxml.c:2189: warning: implicit declaration of function 'PyCapsule_CheckExact'libxml.c:2189: warning: nested extern declaration of 'PyCapsule_CheckExact'libxml.c: In function 'libxml_getObjDesc':libxml.c:3778: warning: implicit declaration of function 'PyCapsule_GetPointer'libxml.c:3778: warning: nested extern declaration of 'PyCapsule_GetPointer'libxml.c:3778: warning: implicit declaration of function 'PyCapsule_GetName'libxml.c:3778: warning: nested extern declaration of 'PyCapsule_GetName'libxml.c:3778: warning: assignment makes pointer from integer without a cast CC libxml2-py.lo CC types.lotypes.c: In function 'libxml_xmlDocPtrWrap':types.c:236: warning: implicit declaration of function 'PyCapsule_New'types.c:236: warning: nested extern declaration of 'PyCapsule_New'types.c:236: warning: assignment makes pointer from integer without a casttypes.c: In function 'libxml_xmlNodePtrWrap':types.c:252: warning: assignment makes pointer from integer without a casttypes.c: In function 'libxml_xmlURIPtrWrap':types.c:268: warning: assignment makes pointer from integer without a casttypes.c: In function 'libxml_xmlNsPtrWrap':types.c:284: warning: assignment makes pointer from integer without a casttypes.c: In function 'libxml_xmlAttrPtrWrap':types.c:300: warning: assignment makes pointer from integer without a casttypes.c: In function 'libxml_xmlAttributePtrWrap':types.c:316: warning: assignment makes pointer from integer without a casttypes.c: In function 'libxml_xmlElementPtrWrap':types.c:332: warning: assignment makes pointer from integer without a casttypes.c: In function 'libxml_xmlXPathContextPtrWrap':types.c:348: warning: assignment makes pointer from integer without a casttypes.c: In function 'libxml_xmlXPathParserContextPtrWrap':types.c:364: warning: assignment makes pointer from integer without a casttypes.c: In function 'libxml_xmlParserCtxtPtrWrap':types.c:381: warning: assignment makes pointer from integer without a casttypes.c: In function 'libxml_xmlXPathObjectPtrWrap':types.c:465: warning: initialization makes pointer from integer without a casttypes.c: In function 'libxml_xmlXPathObjectPtrConvert':types.c:669: warning: implicit declaration of function 'PyCapsule_CheckExact'types.c:669: warning: nested extern declaration of 'PyCapsule_CheckExact'types.c: In function 'libxml_xmlValidCtxtPtrWrap':types.c:714: warning: assignment makes pointer from integer without a casttypes.c: In function 'libxml_xmlCatalogPtrWrap':types.c:733: warning: assignment makes pointer from integer without a casttypes.c: In function 'libxml_xmlOutputBufferPtrWrap':types.c:751: warning: assignment makes pointer from integer without a casttypes.c: In function 'libxml_xmlParserInputBufferPtrWrap':types.c:769: warning: assignment makes pointer from integer without a casttypes.c: In function 'libxml_xmlRegexpPtrWrap':types.c:788: warning: assignment makes pointer from integer without a casttypes.c: In function 'libxml_xmlTextReaderPtrWrap':types.c:808: warning: assignment makes pointer from integer without a casttypes.c: In function 'libxml_xmlTextReaderLocatorPtrWrap':types.c:826: warning: assignment makes pointer from integer without a casttypes.c: In function 'libxml_xmlRelaxNGPtrWrap':types.c:846: warning: assignment makes pointer from integer without a casttypes.c: In function 'libxml_xmlRelaxNGParserCtxtPtrWrap':types.c:864: warning: assignment makes pointer from integer without a casttypes.c: In function 'libxml_xmlRelaxNGValidCtxtPtrWrap':types.c:881: warning: assignment makes pointer from integer without a casttypes.c: In function 'libxml_xmlSchemaPtrWrap':types.c:899: warning: assignment makes pointer from integer without a casttypes.c: In function 'libxml_xmlSchemaParserCtxtPtrWrap':types.c:917: warning: assignment makes pointer from integer without a casttypes.c: In function 'libxml_xmlSchemaValidCtxtPtrWrap':types.c:937: warning: assignment makes pointer from integer without a casttypes.c: In function 'libxml_xmlErrorPtrWrap':types.c:955: warning: assignment makes pointer from integer without a cast CCLD libxml2mod.lamake[4]: Leaving directory `/usr/src/libxml2-2.9.1/python'Making all in testsmake[4]: Entering directory `/usr/src/libxml2-2.9.1/python/tests'make[4]: Nothing to be done for `all'.make[4]: Leaving directory `/usr/src/libxml2-2.9.1/python/tests'make[3]: Leaving directory `/usr/src/libxml2-2.9.1/python'make[2]: Leaving directory `/usr/src/libxml2-2.9.1/python'make[1]: Leaving directory `/usr/src/libxml2-2.9.1'问题解决