繁体   English   中英

DBIx :: Class :: Schema :: Loader安装失败

[英]DBIx::Class::Schema::Loader installation fails

好吧,过去两天我一直在努力完成这项工作,重新安装依赖项,更新模块,但没有找到任何解决方案。

安装命令行:

$> cpan DBIx::Class::Schema::Loader

我的测试失败,例如:

  GENEHACK/DBIx-Class-Schema-Loader-0.07035.tar.gz
  /usr/bin/make -- OK
CPAN: YAML loaded ok (v0.84)
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t t/backcompat/0.04006/*.t
t/01use.t ............................... ok     
t/02pod.t ............................... ok     
t/10_01sqlite_common.t .................. 6/294 
#   Failed test 'Correct number of warnings'
#   at t/lib/dbixcsl_common_tests.pm line 323.
#          got: '10'
#     expected: '9'
# Column 'dbix_class_testcomponent' in table 'loader_test2' collides with an inherited method.
# See "COLUMN ACCESSOR COLLISIONS" in perldoc DBIx::Class::Schema::Loader::Base .
# Column 'dbix_class_testcomponentmap' in table 'loader_test2' collides with an inherited method.
# See "COLUMN ACCESSOR COLLISIONS" in perldoc DBIx::Class::Schema::Loader::Base .
# Column 'testcomponent_fqn' in table 'loader_test2' collides with an inherited method.
# Column 'set_primary_key' in table 'loader_test2' collides with an inherited method.
# See "COLUMN ACCESSOR COLLISIONS" in perldoc DBIx::Class::Schema::Loader::Base .
# Column 'set_primary_key' in table 'loader_test4' collides with an inherited method.
# See "COLUMN ACCESSOR COLLISIONS" in perldoc DBIx::Class::Schema::Loader::Base .
# Column 'belongs_to' in table 'loader_test4' collides with an inherited method.
# See "COLUMN ACCESSOR COLLISIONS" in perldoc DBIx::Class::Schema::Loader::Base .
# Relationship 'belongs_to' in source 'LoaderTest4' for columns 'belongs_to' collides with an inherited method. Renaming to 'belongs_to_rel'.
# See "RELATIONSHIP NAME COLLISIONS" in perldoc DBIx::Class::Schema::Loader::Base .
# stat(t/var/common_dump/DBIXCSL_Test/Schema/MyResult/LoaderTest1.pm): No such file or directory at .cpan/build/DBIx-Class-Schema-Loader-0.07035-Emrz71/blib/lib/DBIx/Class/Schema/Loader/Base.pm line 1370.
# Dumping manual schema for DBIXCSL_Test::Schema to directory t/var/common_dump ...
# Schema dump completed.
t/10_01sqlite_common.t .................. 294/294 # Looks like you failed 1 test of 294.
t/10_01sqlite_common.t .................. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/294 subtests 
        (less 2 skipped subtests: 291 okay)
t/10_02mysql_common.t ................... skipped: You need to set the DBICTEST_MYSQL_DSN, DBICTEST_MYSQL_USER, and DBICTEST_MYSQL_PASS environment variables
t/10_03pg_common.t ...................... skipped: You need to set the DBICTEST_PG_DSN, _USER, and _PASS environment variables
t/10_04db2_common.t ..................... skipped: You need to set the DBICTEST_DB2_DSN, _USER, and _PASS environment variables
t/10_05ora_common.t ..................... skipped: You need to set the DBICTEST_ORA_DSN, _USER, and _PASS environment variables
t/10_06sybase_common.t .................. skipped: You need to set the DBICTEST_SYBASE_DSN, _USER, and _PASS environment variables
t/10_07mssql_common.t ................... skipped: You need to set the DBICTEST_MSSQL_DSN, _USER and _PASS and /or the DBICTEST_MSSQL_ODBC_DSN, _USER and _PASS environment variables
t/10_08sqlanywhere_common.t ............. skipped: You need to set the DBICTEST_SQLANYWHERE_DSN, _USER and _PASS and/or the DBICTEST_SQLANYWHERE_ODBC_DSN, _USER and _PASS environment variables
t/10_09firebird_common.t ................ skipped: You need to set the DBICTEST_FIREBIRD_DSN, _USER and _PASS and/or the DBICTEST_FIREBIRD_INTERBASE_DSN and/or the DBICTEST_FIREBIRD_ODBC_DSN environment variables
t/10_10informix_common.t ................ skipped: You need to set the DBICTEST_INFORMIX_DSN, _USER, and _PASS environment variables
t/10_11msaccess_common.t ................ skipped: You need to set the DBICTEST_MSACCESS_ODBC_DSN, and optionally _USER and _PASS and/or the DBICTEST_MSACCESS_ADO_DSN, and optionally _USER and _PASS environment variables
t/20invocations.t ....................... ok     
t/21misc_fatal.t ........................ ok   
t/22dump.t .............................. ok   
t/23dumpmore.t .......................... 1/? 
#   Failed test 'DBICTest::Schema::_no_skip_load_external warning count'
#   at t/lib/dbixcsl_dumper_tests.pm line 176.
#          got: '1'
#     expected: '0'
# stat(t/var/dump/DBICTest/Schema/_no_skip_load_external/Foo.pm): No such file or directory at .cpan/build/DBIx-Class-Schema-Loader-0.07035-Emrz71/blib/lib/DBIx/Class/Schema/Loader/Base.pm line 1370.
t/23dumpmore.t .......................... 95/? make: *** wait: No child processes.  Stop.

更新

正如abraxxa所建议的,我尝试了更新的perl版本:

icsl8684> perl -v

This is perl 5, version 12, subversion 2 (v5.12.2) built for x86_64-linux

另外,我使用local :: lib是因为我没有root权限。 我重新运行测试,它们再次失败。 但是,我看不出cpan安装过程中的perl版本已更改:

PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t t/backcompat/0.04006/*.t
t/01use.t ............................... ok     
t/02pod.t ............................... ok     
t/10_01sqlite_common.t .................. 6/294 
#   Failed test 'Correct number of warnings'
#   at t/lib/dbixcsl_common_tests.pm line 323.
#          got: '10'
#     expected: '9'
# Column 'dbix_class_testcomponent' in table 'loader_test2' collides with an inherited method.
# See "COLUMN ACCESSOR COLLISIONS" in perldoc DBIx::Class::Schema::Loader::Base .
# Column 'dbix_class_testcomponentmap' in table 'loader_test2' collides with an inherited method.

第一行使用/usr/bin/perl代替

~/.perl/perl

我已更改$PATH以使用较新的perl版本,的确如此(请参阅perl -v行)。

我感到这里有些混乱。 我还尝试安装cpan[5]> install Devel::DProf并收到以下错误:无法加载'〜/ .cpan / build / Devel-DProf-20110802.00-cJFc6O / blib / arch / auto / Devel / DProf /DProf.so'用于模块Devel :: DProf:〜/ .cpan / build / Devel-DProf-20110802.00-cJFc6O / blib / arch / auto / Devel / DProf / DProf.so:未定义符号:/ usr / lib中的get_cvn_flags /perl5/5.8.8/x86_64-linux-thread-multi/DynaLoader.pm第230行。位于dprof / test8_t第0行。

如您所见,它尝试从/ usr / lib /而不是我的local :: lib加载DynaLoader。

DBIx :: Class维护者在很大程度上使其向下兼容其META文件中声明的Perl 5.8.1版本。 可能是某些其他组件(例如DBD :: SQLite或DBIx :: Class :: Schema :: Loader)在您的特定版本(RedHat Enterprise Linux 4?)上存在错误。 DBIx :: Class在其故障排除文档中甚至有一节: 红帽系统上的Perl性能问题

如果要安装自己的Perl,建议的方法是使用perlbrew 您甚至不需要root用户访问权限,您可以将其安装在主目录中,甚至可以安装多个完全分开的不同或相同版本的安装,例如每个应用程序一个。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM