• Home »
  • Errors »
  • CentOS Linux Configure: error: *** neither libexpat not libbsdxml could be found ***

CentOS Linux Configure: error: *** neither libexpat not libbsdxml could be found ***

While running a configure script to eventually compile an application during testing on CentOS Linux I received an error stating that libexpat and/or libbsdxml could not be found. On CentOS you will only need to install libexpat-devel as shown in the below example following the output of the configure error and how we located what package installed libexpat via yum.

Configure Error On CentOS Linux:

bash

  1. configure: error: *** neither libexpat not libbsdxml could be found ***

Once the above error was displayed following a failed configure attempt I used “yum whatprovides” to see what package in the installed yum repositories installed libexpat as shown in the below example output.

Locate RPM Packages That Installed libexpat:

bash

  1. [root@dev ~]# yum whatprovides *libexpat*
  2. Loaded plugins: fastestmirror, refresh-packagekit
  3. Loading mirror speeds from cached hostfile
  4.  * base: centos.netnitco.net
  5.  * epel: mirror.steadfast.net
  6.  * extras: mirror.steadfast.net
  7.  * rpmforge: ftp-stud.fht-esslingen.de
  8.  * updates: mirror.rackspace.com
  9. harbour-contrib-3.0.0-11.el6.x86_64 : Contributed tools for Harbour
  10. Repo        : atrpms
  11. Matched from:
  12. Filename    : /usr/lib64/harbour/libexpat.a
  13.  
  14. compat-expat1-1.95.8-8.el6.x86_64 : A library for parsing XML documents
  15. Repo        : base
  16. Matched from:
  17. Filename    : /usr/lib64/libexpat.so.0
  18. Filename    : /usr/lib64/libexpat.so.0.5.0
  19. Other       : libexpat.so.0()(64bit)
  20.  
  21. expat-devel-2.0.1-9.1.el6.x86_64 : Libraries and header files to develop applications using expat
  22. Repo        : base
  23. Matched from:
  24. Filename    : /usr/lib64/libexpat.so
  25. Filename    : /usr/lib64/libexpat.a
  26.  
  27. expat-2.0.1-9.1.el6.x86_64 : An XML parser library
  28. Repo        : base
  29. Matched from:
  30. Filename    : /lib64/libexpat.so.1
  31. Filename    : /lib64/libexpat.so.1.5.2
  32. Other       : libexpat.so.1()(64bit)
  33.  
  34. expat-2.0.1-9.1.el6.x86_64 : An XML parser library
  35. Repo        : installed
  36. Matched from:
  37. Filename    : /lib64/libexpat.so.1
  38. Filename    : /lib64/libexpat.so.1.5.2
  39. Other       : libexpat.so.1()(64bit)
  40.  
  41. [root@dev ~]#

In my case expat was already installed but I needed to install expat-devel since the libraries needed to compile are included in that RPM package. Below is example output from installing expat-devel using YUM on CentOS Linux.

Install expat-devel On CentOS Linux:

bash

  1. [root@dev ~]# yum install expat-devel
  2. Loaded plugins: fastestmirror, refresh-packagekit
  3. Loading mirror speeds from cached hostfile
  4.  * base: centos.netnitco.net
  5.  * epel: mirror.steadfast.net
  6.  * extras: mirror.steadfast.net
  7.  * rpmforge: ftp-stud.fht-esslingen.de
  8.  * updates: mirror.symnds.com
  9. Setting up Install Process
  10. Resolving Dependencies
  11. --> Running transaction check
  12. ---> Package expat-devel.x86_64 0:2.0.1-9.1.el6 set to be updated
  13. --> Finished Dependency Resolution
  14.  
  15. Dependencies Resolved
  16.  
  17. =====================================================================================================================================================
  18.  Package                               Arch                             Version                                 Repository                      Size
  19. =====================================================================================================================================================
  20. Installing:
  21.  expat-devel                           x86_64                           2.0.1-9.1.el6                           base                           119 k
  22.  
  23. Transaction Summary
  24. =====================================================================================================================================================
  25. Install       1 Package(s)
  26. Upgrade       0 Package(s)
  27.  
  28. Total download size: 119 k
  29. Installed size: 475 k
  30. Is this ok [y/N]: y
  31. Downloading Packages:
  32. expat-devel-2.0.1-9.1.el6.x86_64.rpm                                                                                          | 119 kB     00:00
  33. Running rpm_check_debug
  34. Running Transaction Test
  35. Transaction Test Succeeded
  36. Running Transaction
  37.   Installing     : expat-devel-2.0.1-9.1.el6.x86_64                                                                                              1/1
  38.  
  39. Installed:
  40.   expat-devel.x86_64 0:2.0.1-9.1.el6
  41.  
  42. Complete!
  43. [root@dev ~]#

While I did run into other issues when running the cofnigure script I no longer received the error specified at the beginning of the article after installing expat-devel.

Foundations of CentOS Linux: Enterprise Linux On the Cheap (Books for Professionals by Professionals) (Paperback)


List Price: $42.99 USD
New From: $24.99 USD In Stock
Used from: $10.10 USD In Stock

The Accidental Administrator: Linux Server Step-by-Step Configuration Guide (Paperback)


List Price: $40.00 USD
New From: $31.76 USD In Stock
Used from: $34.27 USD In Stock

Share