Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате
Форум программистов > Perl: Общие вопросы > установка модуля DBI


Автор: DEER 16.11.2005, 10:38
короче скачал версию perl'а 5.008007, установил.
Пытаюсь установить модуль DBI
Цитата
C:\Libs\DBI-1.48>perl Makefile.pl

*** You are using a perl configured with threading enabled.
*** You should be aware that using multiple threads is
*** not recommended for production environments.

*** Note:
    The optional PlRPC-modules (RPC::PlServer etc) are not installed.
    If you want to use the DBD::Proxy driver and DBI::ProxyServer
    modules, then you'll need to install the RPC::PlServer, RPC::PlClient,
    Storable and Net::Daemon modules. The CPAN Bundle::DBI may help you.
    You can install them any time after installing the DBI.
    You do *not* need these modules for typical DBI usage.

Optional modules are available from any CPAN mirror, in particular
    http://search.cpan.org/
    http://www.perl.com/CPAN/modules/by-module
    http://www.perl.org/CPAN/modules/by-module
    ftp://ftp.funet.fi/pub/languages/perl/CPAN/modules/by-module

*** You're using Microsoft Visual C++ compiler but the LIB and INCLUDE environme
nt
    variables are not both set. If you have 'unresolved external symbol'
    errors during linking, run the vcvars32.bat batch file to set up your
    LIB and INCLUDE environment variables, and try again.
    A copy of vcvars32.bat can typically be found in the following
    directories under your Visual Studio install directory:
        Visual C++ 6.0:    vc98\bin
        Visual Studio .NET: vc7\bin

Creating DBI::PurePerl    test variant: t/zvpp_01basics.t
Creating DBI::PurePerl    test variant: t/zvpp_02dbidrv.t
Creating DBI::PurePerl    test variant: t/zvpp_03handle.t
Creating DBI::PurePerl    test variant: t/zvpp_04mods.t
Creating DBI::PurePerl    test variant: t/zvpp_05thrclone.t (use threads)
Creating DBI::PurePerl    test variant: t/zvpp_06attrs.t
Creating DBI::PurePerl    test variant: t/zvpp_07kids.t
Creating DBI::PurePerl    test variant: t/zvpp_08keeperr.t
Creating DBI::PurePerl    test variant: t/zvpp_09trace.t
Creating DBI::PurePerl    test variant: t/zvpp_10examp.t
Creating DBI::PurePerl    test variant: t/zvpp_11fetch.t
Creating DBI::PurePerl    test variant: t/zvpp_14utf8.t
Creating DBI::PurePerl    test variant: t/zvpp_15array.t
Creating DBI::PurePerl    test variant: t/zvpp_20meta.t
Creating DBI::PurePerl    test variant: t/zvpp_30subclass.t
Creating DBI::PurePerl    test variant: t/zvpp_40profile.t
Creating DBI::PurePerl    test variant: t/zvpp_41prof_dump.t
Creating DBI::PurePerl    test variant: t/zvpp_42prof_data.t
Creating DBI::PurePerl    test variant: t/zvpp_50dbm.t
Creating DBI::PurePerl    test variant: t/zvpp_60preparse.t
Creating DBI::PurePerl    test variant: t/zvpp_80proxy.t

    I see you're using perl 5.008007 on MSWin32-x86-multi-thread, okay.
    Remember to actually *read* the README file!
    Use  'make' to build the software (dmake or nmake on Windows).
    Then 'make test' to execute self tests.
    Then 'make install' to install the DBI and then delete this working
    directory before unpacking and building any DBD::* drivers.

    Windows users need to use the correct make command.
    That may be nmake or dmake depending on which Perl you are using.
    If using the Win32 ActiveState build then it is recommended that you
    use the ppm utility to fetch and install a prebuilt DBI instead.

Writing Makefile for DBI

что означает сей коммент?
по моему DBI не установилась smile
Для теста написал маленький скриптик
Код

#!/usr/bin/perl
use DBI();
print "Hello World!\n";
<STDIN>;

а мне выводят
Цитата

Can't locate DBI.pm in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib .) at 2
2.pl line 3.
BEGIN failed--compilation aborted at 22.pl line 3.

какие варианты решения этой проблемы?

Автор: korob2001 16.11.2005, 10:54
А почему не пользуешься PPM? И что за версия PERL такая? Скачай себе последнюю с ActiveState

Автор: DEER 16.11.2005, 10:58
у меня сдесь, на работе есть инет, а дома нету smile
Я понял это он мне инструкцию напечатал...
скачал nmake.
теперь при запуске nmake вылетает ошибка, что не может найти какую то библиотеку...
но это уже проблемы Visual Studio




Добавлено @ 11:05
Цитата(korob2001 @ 16.11.2005, 10:54)
А почему не пользуешься PPM? И что за версия PERL такая? Скачай себе последнюю с ActiveState

оттуда и скачал smile
Добавлено @ 11:06
http://www.activestate.com/Products/Download/Download.plex?id=ActivePerl

Автор: korob2001 16.11.2005, 11:11
Качай последнюю версию Perl отсюда, файл MSI for Windows:
http://www.activestate.com/Products/Download/Download.plex?id=ActivePerl

Затем качай модуль DBI и DBD-mysql (если предполагается работа с MySQL), отсюда:
http://ppm.activestate.com/PPMPackages/zips/8xx-builds-only/Windows/

Записывай всё это дело на CD и иди домой.

Снеси тот Perl который у тебя установлен.

Установи тот, который ты принёс с работы, на CD

Распаковывай zip архивы с модулями, например на диск C:/
Получится что-то вроде:
C:\DBI\
С:\DBD-mysql\

открой командную строку и дай следующюю команду:
C:\>ppm

Затем дай такую команду:
ppm>install C:\DBD-mysql\DBD-mysql.ppd

Затем:
ppm>install C:\DBI\DBI.ppd

Вот и всё.

Автор: DEER 16.11.2005, 11:17
Цитата(korob2001 @ 16.11.2005, 11:11)
Качай последнюю версию Perl отсюда, файл MSI for Windows:
http://www.activestate.com/Products/Download/Download.plex?id=ActivePerl
Вот и всё.

А есть разница что качать
AS package
или
MSI
smile
а то я уже скачал AS pacakge,
установил тут на работе, вроде работает...

Автор: korob2001 16.11.2005, 11:23
Да разницы нет, просто MSI намного удобнее устанавливать, т.е. это тот же AS package, только засунутый в инсталятор.

Автор: DEER 16.11.2005, 11:31
Спасибо тебе огромное!!
У меня ещё парочка вопросов, но в другую тему

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)