Pergunta
Consulte a Parte 2, que lista os erros mais recentes durante a instalação do módulo postagem continuada.
Normalmente, quando tento instalar o módulo XML::Xerces CPAN usando o padrão cpan> install XML::Xercers, recebo a seguinte mensagem de erro após algum processamento:
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
Depois de definir variáveis de ambiente para /home/username/XML-Xerces-2.7.0-0/XML-Xerces-2.7.0-0/Xerces.pm
, observe aqui que não tenho certeza se devo apontar minha variável de ambiente para Xerces.pm
ou Xerces.cpp
ou Xerces-extra.pm
ou Xerces.i
, mas por enquanto estou apontando variáveis de ambiente para /home/username/XML-Xerces-2.7.0-0/XML-Xerces-2.7.0-0/Xerces.pm
Depois de definir as variáveis de ambiente conforme mencionado e inserir cpan>install XML::Xerces
Recebo a seguinte mensagem:
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
Observação: Eu tentei baixar XML::Xerces
e estou tentando instalá-lo novamente, tanto manualmente quanto usando CPAN, mas estou recebendo a mensagem de erro mencionada acima.
Qual pode ser o possível motivo e o que pode ser sugerido para resolver esse problema?
Atualizar:Mesmo depois de construir o Xerces-C, o módulo XML::Xerces não está sendo compilado e estou recebendo a seguinte mensagem de erro.
[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.
Atualização2Aqui está o erro que estou recebendo, diz que há algum tipo de incompatibilidade de versão.
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
Solução
Aqui está uma regra geral:qualquer variável de ambiente chamada algo como "ROOT" está solicitando um diretório, não um arquivo.
No entanto, não parece que você instalou a biblioteca Xerces, que é necessária antes de instalar o módulo perl.Citarei algumas partes da saída que você forneceu, como a dica que você perdeu sobre o que fazer a seguir:
"...Eles me instruem como localizar os arquivos de cabeçalho do Xerces e a biblioteca dinâmica do Xerces..."
"Sem estes não consigo encontrar o arquivo config.status que foi usado para construir sua biblioteca Xerces-C"
Então você instalou Xerces-C?Você terá resultados muito melhores instalando o módulo Perl depois disso.
Outras dicas
Você tentou usar o PPM para instalar XML::Xerces?