在编译libxml2-2.9.1时报下列错误
make[4]: *** [libxml.lo] 错误 1
make[4]: Leaving directory `/usr/src/libxml2-2.9.1/python'
make[3]: *** [all-recursive] 错误 1
make[3]: Leaving directory `/usr/src/libxml2-2.9.1/python'
make[2]: *** [all] 错误 2
make[2]: Leaving directory `/usr/src/libxml2-2.9.1/python'
make[1]: *** [all-recursive] 错误 1
make[1]: Leaving directory `/usr/src/libxml2-2.9.1'
make: *** [all] 错误 2
解决方法:
查看python-devel包是否安装
[root@localhost libxml2-2.9.1]# rpm -q python-devel
package python-devel is not installed
安装python-devel软件包
[root@localhost libxml2-2.9.1]# yum -y install python-devel
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package python-devel.x86_64 0:2.6.6-51.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================================================
Installing:
python-devel x86_64 2.6.6-51.el6 RHEL 171 k
Transaction Summary
=============================================================================================================================================================
Install 1 Package(s)
Total download size: 171 k
Installed size: 456 k
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : python-devel-2.6.6-51.el6.x86_64 1/1
Verifying : python-devel-2.6.6-51.el6.x86_64 1/1
Installed:
python-devel.x86_64 0:2.6.6-51.el6
Complete!
重新进行编译
[root@localhost libxml2-2.9.1]# make
make all-recursive
make[1]: Entering directory `/usr/src/libxml2-2.9.1'
Making all in include
make[2]: Entering directory `/usr/src/libxml2-2.9.1/include'
Making all in libxml
make[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 doc
make[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 devhelp
make[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 examples
make[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 example
make[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 xstc
make[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 python
make[2]: Entering directory `/usr/src/libxml2-2.9.1/python'
make all-recursive
make[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.lo
libxml.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.lo
types.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 cast
types.c: In function 'libxml_xmlNodePtrWrap':
types.c:252: warning: assignment makes pointer from integer without a cast
types.c: In function 'libxml_xmlURIPtrWrap':
types.c:268: warning: assignment makes pointer from integer without a cast
types.c: In function 'libxml_xmlNsPtrWrap':
types.c:284: warning: assignment makes pointer from integer without a cast
types.c: In function 'libxml_xmlAttrPtrWrap':
types.c:300: warning: assignment makes pointer from integer without a cast
types.c: In function 'libxml_xmlAttributePtrWrap':
types.c:316: warning: assignment makes pointer from integer without a cast
types.c: In function 'libxml_xmlElementPtrWrap':
types.c:332: warning: assignment makes pointer from integer without a cast
types.c: In function 'libxml_xmlXPathContextPtrWrap':
types.c:348: warning: assignment makes pointer from integer without a cast
types.c: In function 'libxml_xmlXPathParserContextPtrWrap':
types.c:364: warning: assignment makes pointer from integer without a cast
types.c: In function 'libxml_xmlParserCtxtPtrWrap':
types.c:381: warning: assignment makes pointer from integer without a cast
types.c: In function 'libxml_xmlXPathObjectPtrWrap':
types.c:465: warning: initialization makes pointer from integer without a cast
types.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 cast
types.c: In function 'libxml_xmlCatalogPtrWrap':
types.c:733: warning: assignment makes pointer from integer without a cast
types.c: In function 'libxml_xmlOutputBufferPtrWrap':
types.c:751: warning: assignment makes pointer from integer without a cast
types.c: In function 'libxml_xmlParserInputBufferPtrWrap':
types.c:769: warning: assignment makes pointer from integer without a cast
types.c: In function 'libxml_xmlRegexpPtrWrap':
types.c:788: warning: assignment makes pointer from integer without a cast
types.c: In function 'libxml_xmlTextReaderPtrWrap':
types.c:808: warning: assignment makes pointer from integer without a cast
types.c: In function 'libxml_xmlTextReaderLocatorPtrWrap':
types.c:826: warning: assignment makes pointer from integer without a cast
types.c: In function 'libxml_xmlRelaxNGPtrWrap':
types.c:846: warning: assignment makes pointer from integer without a cast
types.c: In function 'libxml_xmlRelaxNGParserCtxtPtrWrap':
types.c:864: warning: assignment makes pointer from integer without a cast
types.c: In function 'libxml_xmlRelaxNGValidCtxtPtrWrap':
types.c:881: warning: assignment makes pointer from integer without a cast
types.c: In function 'libxml_xmlSchemaPtrWrap':
types.c:899: warning: assignment makes pointer from integer without a cast
types.c: In function 'libxml_xmlSchemaParserCtxtPtrWrap':
types.c:917: warning: assignment makes pointer from integer without a cast
types.c: In function 'libxml_xmlSchemaValidCtxtPtrWrap':
types.c:937: warning: assignment makes pointer from integer without a cast
types.c: In function 'libxml_xmlErrorPtrWrap':
types.c:955: warning: assignment makes pointer from integer without a cast
CCLD libxml2mod.la
make[4]: Leaving directory `/usr/src/libxml2-2.9.1/python'
Making all in tests
make[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'
问题解决