2013-04-24 3 views
0

Ну, я пытался получить эту работу последние два дня, повторно установить зависимости, обновить модули, но я не нашел никакого решения.DBIx :: Class :: Schema :: Ошибка установки загрузчика

установить командную строку:

$> 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 и получил следующую ошибку: Не могу загрузить '~/.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: undefined symbol: get_cvn_flags на /usr/lib/perl5/5.8.8/x86_64 -linux-thread-multi/DynaLoader.pm line 230. в строке dprof/test8_t 0.

Как вы можете видеть, он пытается загрузить DynaLoader из/usr/lib/вместо локального :: lib У меня есть ,

+0

Пожалуйста, добавьте версию ОС, версию Perl и версии модулей, по крайней мере, для DBI, DBD :: SQLite и DBIx :: Class, которые вы используете. –

+0

Я использую Unix. Версия Perl v5.8.5. DBI - 1.625. DBD :: SQLite - 1.37. DBIx :: Class - 0.08210. Благодаря! – Mattan

+0

Unix или Linux? Поскольку вы используете такую ​​старую версию Perl, я предполагаю, что вы используете Perl Distro. Запустите неудачный тестовый пример, используя параметр -vl t/10_01sqlite_common.t и добавьте его вывод. –

ответ

1

Хранители DBIx :: Class значительно облегчают его совместимость с версией Perl 5.8.1, которая объявлена ​​в ее файле META. Возможно, некоторые другие компоненты, такие как DBD :: SQLite или DBIx :: Class :: Schema :: Loader, имеют ошибку в вашей конкретной версии (RedHat Enterprise Linux 4?). DBIx :: Class имеет даже раздел в документах по устранению неполадок: Perl Performance Issues on Red Hat Systems

Если вы хотите установить свой собственный Perl, рекомендуется использовать perlbrew. Вам даже не нужен root-доступ, вы можете установить его в своем домашнем каталоге, даже несколько, полностью разделенных установок разных или одинаковых версий, по одному для каждого приложения.

+0

Спасибо. Это не помогло, см. Мой обновленный пост выше. – Mattan

+0

Почему вы не использовали perlbrew, как я предложил? Если вы установили свой собственный Perl, вам не нужно использовать local :: lib, потому что он имеет свой собственный @INC. perlbrew делает все это очень просто без знания внутренних компонентов Perl относительно всего этого. –

+0

Спасибо. Я попробовал его с perlbrew, и этот пакет был успешно установлен :) Однако я столкнулся с другой проблемой, о которой я задам отдельный вопрос. Еще раз спасибо. – Mattan