2013-04-24 79 views
0

那麼,我一直試圖在過去兩天得到這個工作,重新安裝依賴關係,更新模塊,但我還沒有找到任何解決方案。DBIx :: Class :: Schema :: Loader安裝失敗

安裝的命令行:

$> 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. 

UPDATE

由於abraxxa建議,我嘗試了新的perl版本:

icsl8684> perl -v 

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

另外,我使用local :: lib,因爲我沒有root權限。 我重新運行測試,並再次失敗。 不過,我沒有看到的perl版本在CPAN已經改變了安裝proccess:

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,並得到以下錯誤: 無法爲模塊Devel加載'〜/ .cpan/build/Devel-DProf-20110802.00-cJFc6O/blib/arch/auto/Devel/DProf/DProf.so' :: DProf:〜/ .cpan/build/Devel-DProf-20110802.00-cJFc6O/blib/arch/auto/Devel/DProf/DProf.so:undefined symbol:get_cvn_flags在/usr/lib/perl5/5.8.8/x86_64 -linux-thread-multi/DynaLoader.pm line 230. at dprof/test8_t line 0.

正如您所看到的,它會嘗試從/ usr/lib /而不是local :: lib加載DynaLoader我有。

+0

請至少爲您正在使用的DBI,DBD :: SQLite和DBIx :: Class添加OS,Perl版本和模塊版本。 – 2013-04-24 09:30:14

+0

我正在使用Unix。 Perl版本v5.8.5。 DBI - 1.625。 DBD :: SQLite - 1.37。 DBIx :: Class - 0.08210。謝謝! – Mattan 2013-04-24 09:36:13

+0

Unix還是Linux?因爲你使用的是這樣一箇舊的Perl版本,我假設你使用Distro的Perl。使用prove -vl t/10_01sqlite_common.t運行失敗的測試用例並添加其輸出。 – 2013-04-24 09:39:03

回答

1

DBIx :: Class維護者採用了一種很大的方式使其向下兼容版本爲在其META文件中聲明的Perl 5.8.1。可能是某些其他組件(如DBD :: SQLite或DBIx :: Class :: Schema :: Loader)在您的特定版本(RedHat Enterprise Linux 4?)上存在一個錯誤。 DBIx :: Class在其疑難解答文檔中甚至有一節:Perl Performance Issues on Red Hat Systems

如果要安裝自己的Perl,推薦的方法是使用perlbrew。您甚至不需要root訪問權限,您可以將它安裝在您的主目錄中,甚至可以安裝多個完全分離的不同版本或不同版本的安裝,例如每個應用程序一個。

+0

謝謝。它沒有幫助,請參閱我上面更新的帖子。 – Mattan 2013-04-25 13:35:47

+0

爲什麼不按照我的建議使用perlbrew?如果你安裝了你自己的Perl,你不需要使用local :: lib,因爲它有自己的@INC。 perlbrew使所有這些都非常簡單,而不需要知道Perl內部關於這一切的所有知識。 – 2013-04-26 08:06:28

+0

謝謝。我用perlbrew試了一下,這個軟件包安裝成功了:)但是,我遇到了另一個問題,我會問一個單獨的問題。再次感謝。 – Mattan 2013-04-26 10:01:20