How difficult is that to install OpenCA? I know the documentation is poor and the package is dependent on plenty of Perl modules. During the installation of OpenCA package version 1.5.1, I ended up with an error – “ERROR::The PERL XML-Parser module requires expat-devel one (/usr/include/expat.h)”.
Solution: PERL XML-Parser module requires expat-devel
The error indicates that the compilation script is not able to find expat.h
header file and it also says the file is shipped with expat-devel
package. In case if you don’t see an error message that explains which package provides expat.h
file, then you may use the below command to find the same.
On CentOS, you can use yum whatprovides
to search a package that contains particular file.
[root@ra]# yum whatprovides '*/expat.h' expat-devel-2.1.0-10.el7_3.i686 : Libraries and header files to develop applications using expat Repo : base Matched from: Filename : /usr/include/expat.h expat-devel-2.1.0-10.el7_3.x86_64 : Libraries and header files to develop applications using expat Repo : base Matched from: Filename : /usr/include/expat.h xulrunner-devel-31.6.0-2.el7.centos.i686 : Development files for Gecko Repo : base Matched from: Filename : /usr/include/xulrunner-31.6.0/expat.h xulrunner-devel-31.6.0-2.el7.centos.x86_64 : Development files for Gecko Repo : base Matched from: Filename : /usr/include/xulrunner-31.6.0/expat.h expat-devel-2.1.0-10.el7_3.x86_64 : Libraries and header files to develop applications using expat Repo : @base Matched from: Filename : /usr/include/expat.h
On Ubuntu machines:
On Ubuntu machines, you can use apt-file find <filename>
to search a package that provides a particular file.
# apt-file find expat.h autoconf-archive: /usr/share/doc/autoconf-archive/html/ax_005flib_005fexpat.html libexpat1-dev: /usr/include/expat.h libexpat1-dev: /usr/share/doc/libexpat1-dev/expat.html/expat.png libexpat1-dev: /usr/share/doc/libexpat1-dev/expat.html/index.html libexpat1-dev: /usr/share/doc/libexpat1-dev/expat.html/reference.html libexpat1-dev: /usr/share/doc/libexpat1-dev/expat.html/style.css libexpat1-dev: /usr/share/doc/libexpat1-dev/expat.html/valid-xhtml10.png libexpat1-dev: /usr/share/doc/libexpat1-dev/expat.html/xmlwf.1.gz libexpat1-dev: /usr/share/doc/libexpat1-dev/expat.html/xmlwf.sgml.gz libinsighttoolkit3-dev: /usr/include/InsightToolkit/Utilities/expat/expat.h libinsighttoolkit4-dev: /usr/include/ITK-4.9/expat.h libmstoolkit-dev: /usr/include/libmstoolkit/expat.h libpoco-dev: /usr/include/Poco/XML/expat.h libpython2.7-dbg: /usr/include/python2.7_d/pyexpat.h libpython2.7-dev: /usr/include/python2.7/pyexpat.h libpython3.5-dbg: /usr/include/python3.5dm/pyexpat.h libpython3.5-dev: /usr/include/python3.5m/pyexpat.h libvtk5-dev: /usr/include/vtk-5.10/vtk_expat.h libvtk6-dev: /usr/include/vtk-6.2/vtk_expat.h libxmltok1-dev: /usr/share/doc/libxmltok1-dev/expat.html paraview-dev: /usr/include/paraview/vtk_expat.h pypy-doc: /usr/share/doc/pypy-doc/html/config/objspace.usemodules.pyexpat.html python2.7-doc: /usr/share/doc/python2.7/html/library/pyexpat.html python3.5-doc: /usr/share/doc/python3.5/html/library/pyexpat.html slang-expat: /usr/share/slsh/local-packages/help/expat.hlp thunderbird-dev: /usr/include/thunderbird/expat.h
That’s it, installing expat-devel
package should solve the error.
On CentOS:
# yum install expat-devel
On Ubuntu variants:
# apt-get install libexpat1-dev
(or)
# apt-get install libexpat-dev
Note: You need to have OpenSSL installed before installing OpenCA package. If you don’t have OpenSSL installed, then head on to this tutorial to install the same.