如何安装XML :: Xerces? [英] How do I install XML::Xerces?

查看:96
本文介绍了如何安装XML :: Xerces?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请参阅第2部分,其中列出了安装模块时的最新错误续篇.

Please see Part 2 which list latest errors while installing module continued post.

通常,当我尝试使用标准cpan安装XML :: Xerces CPAN模块时>安装XML :: Xercers比经过一些处理后得到以下错误消息:

Normally when I try to install XML::Xerces CPAN module using standard cpan> install XML::Xercers than I get following error message after some processing:

XML-Xerces-2.7.0-0/samples/SEnumVal.pl
...
XML-Xerces-2.7.0-0/postSource.pl
XML-Xerces-2.7.0-0/xerces-headers.txt
Removing previously used /home/adoshi/.cpan/build/XML-Xerces-2.7.0-0

  CPAN.pm: Going to build J/JA/JASONS/XML-Xerces-2.7.0-0.tar.gz


   WARNING

You have not defined any of the following environment variables:
   XERCESCROOT
   XERCES_LIB
   XERCES_INCLUDE

These instruct me how to locate the Xerces header files, and the
Xerces dynamic library. If they are installed in a standard system
directory, I will located them without those variables.

However, if they have been installed in a non-standard location
(e.g. '/usr/include/xerces'), then I will need help. See the README
for more info.

Proceeding ...

   WARNING

You have not defined any of the following environment variables:
   XERCESCROOT
   XERCES_CONFIG

Without these I cannot find the config.status file that was used to
build your Xerces-C library. Without that file, I may not be able to properly
build the C++ glue files that come with Xerces.pm.

Proceeding anyway ...
Couldn't find XercesVersion.hpp in your include directory  at Makefile.PL line 1                                                                             88.
Running make test
  Make had some problems, maybe interrupted? Won't test
Running make install
  Make had some problems, maybe interrupted? Won't install

在将环境变量设置为/home/username/XML-Xerces-2.7.0-0/XML-Xerces-2.7.0-0/Xerces.pm之后,请注意此处不确定我是否应该将环境变量指向Xerces.pmXerces.cppXerces-extra.pmXerces.i,但是现在我将环境变量指向/home/username/XML-Xerces-2.7.0-0/XML-Xerces-2.7.0-0/Xerces.pm

After Setting Enviornment Variables to /home/username/XML-Xerces-2.7.0-0/XML-Xerces-2.7.0-0/Xerces.pm, note here am not sure whether I should point my environment variable to Xerces.pm or Xerces.cpp or Xerces-extra.pm or Xerces.i, but for now am pointing environment variables to /home/username/XML-Xerces-2.7.0-0/XML-Xerces-2.7.0-0/Xerces.pm

按照上述设置环境变量并输入cpan>install XML::Xerces后,我得到以下消息:

After setting environment variables as mentioned and entering cpan>install XML::Xerces I get following message:

CPAN: Storable loaded ok
Going to read /home/username/.cpan/Metadata
  Database was generated on Fri, 16 Oct 2009 18:27:06 GMT
Running install for module XML::Xerces
Running make for J/JA/JASONS/XML-Xerces-2.7.0-0.tar.gz
CPAN: Digest::MD5 loaded ok
CPAN: Compress::Zlib loaded ok
Checksum for /home/adoshi/.cpan/sources/authors/id/J/JA/JASONS/XML-Xerces-2.7.0-0.tar.gz ok
Scanning cache /home/adoshi/.cpan/build for sizes
XML-Xerces-2.7.0-0/
...
XML-Xerces-2.7.0-0/postSource.pl
XML-Xerces-2.7.0-0/xerces-headers.txt
Removing previously used /home/adoshi/.cpan/build/XML-Xerces-2.7.0-0

  CPAN.pm: Going to build J/JA/JASONS/XML-Xerces-2.7.0-0.tar.gz

Using XERCES_LIB = /home/adoshi/XML-Xerces-2.7.0-0/XML-Xerces-2.7.0-0/Xerces.pm
using XERCES_CONFIG: /home/adoshi/XML-Xerces-2.7.0-0/XML-Xerces-2.7.0-0/Xerces.pm

 - Found CXX      =
 - Found CXXFLAGS =
 - Found LDFLAGS  =

Couldn't find XercesVersion.hpp in your include directory  at Makefile.PL line 188, <CONF> line 6823.
Running make test
  Make had some problems, maybe interrupted? Won't test
Running make install
  Make had some problems, maybe interrupted? Won't install

注意:我尝试手动下载XML::Xerces并尝试再次安装它,同时使用CPAN,但遇到上述错误消息.

Note: I have tried downloading XML::Xercesand trying to again install it, both manually as well as using CPAN but am getting above mentioned error message.

可能是什么原因,建议采取什么措施来解决此问题?

What can be the possible reason and what can be suggested turn around to take care of this issue ?

更新:即使在构建Xerces-C之后,仍无法构建XML :: Xerces模块,并且正在遵循以下错误消息.

Update: Even after building Xerces-C, XML::Xerces module is not building and am getting following error message.

[adoshi@upc01.dev XML-Xerces-2.7.0-0]$ perl Makefile.PL
Using XERCES_LIB = /adoshi/lib
Using XERCES_INCLUDE = /adoshi/include/xerces

   WARNING

You have defined the XERCESCROOT variable, but the file:

  XERCESCROOT/src/xercesc/config.status

 does not seem to point to the config.status file that was used to
 build your Xerces-C library. Without that file, I may not be able to
 properly build the C++ glue files that come with Xerces.pm.

Proceeding anyway ...
Couldn't find XercesVersion.hpp in your include directory /adoshi/include/xerces at Makefile.PL line 188.

Update2 这是正在得到的错误,它表示存在某种版本不匹配的情况.

Update2Here is the error which am getting, it says there is somekind of version mismatch.

    Using XERCES_LIB = /home/adoshi/XML-Parser/Parser2/xerces-c_2_8_0-hppa-hpux-acc_3(1)/xerces-c_2_8_0-hppa-hpux-acc_3/lib
Using XERCES_INCLUDE = /home/adoshi/XML-Parser/Parser2/xerces-c_2_8_0-hppa-hpux-acc_3(1)/xerces-c_2_8_0-hppa-hpux-acc_3/include

   WARNING

You have defined the XERCESCROOT variable, but the file:

  XERCESCROOT/src/xercesc/config.status

 does not seem to point to the config.status file that was used to
 build your Xerces-C library. Without that file, I may not be able to
 properly build the C++ glue files that come with Xerces.pm.

Proceeding anyway ...
Using Xerces-C version info from /home/adoshi/XML-Parser/Parser2/xerces-c_2_8_0-hppa-hpux-acc_3(1)/xerces-c_2_8_0-hppa-hpux-acc_3/include/xercesc/util/XercesVersion.hpp
      *** Version Mismatch ***

You are attempt to build XML::Xerces-2.7.0-0 using Xerces-C-2.8.0,
this will most likely fail, so I am aborting.

You must use Xerces-C-2.7.0

推荐答案

这是一条通用规则:任何名为"ROOT"之类的环境变量都在请求目录,而不是文件.

Here's a general rule: any environment variable that is named something like "ROOT" is asking for a directory, not a file.

但是,似乎没有安装Xerces库,这在安装perl模块之前是必需的.我将引用您提供的输出的某些部分,以作为您错过下一步操作的提示:

However, it does not appear that you have installed the Xerces library, which is necessary before you install the perl module. I'll quote some portions of the output you provided, as the hint you missed as to what to do next:

"... 这些指导我如何找到Xerces头文件和Xerces动态库 ..."

"...These instruct me how to locate the Xerces header files, and the Xerces dynamic library..."

"没有这些,我无法找到用于执行以下操作的config.status文件 构建您的Xerces-C库"

"Without these I cannot find the config.status file that was used to build your Xerces-C library"

因此,您是否安装了 Xerces-C ?在那之后安装Perl模块将会有更好的结果.

So, did you install Xerces-C? You'll have much better results installing the Perl module after that.

这篇关于如何安装XML :: Xerces?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆