D:\>verMicrosoft Windows 2000 [Version 5.00.2195]
D:\>ppm install DBI
Installing package 'DBI'...
Bytes transferred: 243541
Installing D:\Perl\site\lib\auto\DBI\dbd_xsh.h
Installing D:\Perl\site\lib\auto\DBI\DBI.bs
Installing D:\Perl\site\lib\auto\DBI\DBI.dll
Installing D:\Perl\site\lib\auto\DBI\DBI.exp
Installing D:\Perl\site\lib\auto\DBI\DBI.lib
Installing D:\Perl\site\lib\auto\DBI\dbipport.h
Installing D:\Perl\site\lib\auto\DBI\DBIXS.h
Installing D:\Perl\site\lib\auto\DBI\dbi_sql.h
Installing D:\Perl\site\lib\auto\DBI\Driver.xst
Installing D:\Perl\html\site\lib\DBI.html
Installing D:\Perl\html\site\lib\Win32\DBIODBC.html
Installing D:\Perl\html\site\lib\DBI\DBD.html
Installing D:\Perl\html\site\lib\DBI\FAQ.html
Installing D:\Perl\html\site\lib\DBI\Format.html
Installing D:\Perl\html\site\lib\DBI\ProxyServer.html
Installing D:\Perl\html\site\lib\DBI\Shell.html
Installing D:\Perl\html\site\lib\DBI\W32ODBC.html
Installing D:\Perl\html\site\lib\DBD\ADO.html
Installing D:\Perl\html\site\lib\DBD\Multiplex.html
Installing D:\Perl\html\site\lib\DBD\Proxy.html
Installing D:\Perl\html\site\lib\Bundle\DBI.html
Installing D:\Perl\site\lib\DBI.pm
Installing D:\Perl\site\lib\Win32\DBIODBC.pm
Installing D:\Perl\site\lib\DBI\DBD.pm
Installing D:\Perl\site\lib\DBI\FAQ.pm
Installing D:\Perl\site\lib\DBI\Format.pm
Installing D:\Perl\site\lib\DBI\ProxyServer.pm
Installing D:\Perl\site\lib\DBI\Shell.pm
Installing D:\Perl\site\lib\DBI\W32ODBC.pm
Installing D:\Perl\site\lib\DBD\ADO.pm
Installing D:\Perl\site\lib\DBD\ExampleP.pm
Installing D:\Perl\site\lib\DBD\Multiplex.pm
Installing D:\Perl\site\lib\DBD\NullP.pm
Installing D:\Perl\site\lib\DBD\Proxy.pm
Installing D:\Perl\site\lib\DBD\Sponge.pm
Installing D:\Perl\site\lib\Bundle\DBI.pm
Installing D:\Perl\bin\dbiproxy
Installing D:\Perl\bin\dbiproxy.bat
Installing D:\Perl\bin\dbish
Installing D:\Perl\bin\dbish.bat
Writing D:\Perl\site\lib\auto\DBI\.packlistD:\>

解决方案 »

  1.   

    D:\>perl -MDBI -e "print 'DBI has been installed'"
    DBI has been installed
    D:\>
      

  2.   

    D:\>perl -MDBI -e "print 'DBI has been installed'"
    用来做什么.
      

  3.   

    perl -MDBI -e "print"就相当于
    perl -e "use DBI;print;"
    -M是use一个包,参见helpD:\>perl --helpUsage: D:\Perl\bin\perl.exe [switches] [--] [programfile] [arguments]
      -0[octal]       specify record separator (\0, if no argument)
      -a              autosplit mode with -n or -p (splits $_ into @F)
      -C              enable native wide character system interfaces
      -c              check syntax only (runs BEGIN and CHECK blocks)
      -d[:debugger]   run program under debugger
      -D[number/list] set debugging flags (argument is a bit mask or alphabets)
      -e 'command'    one line of program (several -e's allowed, omit programfile)
      -F/pattern/     split() pattern for -a switch (//'s are optional)
      -i[extension]   edit <> files in place (makes backup if extension supplied)
      -Idirectory     specify @INC/#include directory (several -I's allowed)
      -l[octal]       enable line ending processing, specifies line terminator
      -[mM][-]module  execute `use/no module...' before executing program
      -n              assume 'while (<>) { ... }' loop around program
      -p              assume loop like -n but print line also, like sed
      -P              run program through C preprocessor before compilation
      -s              enable rudimentary parsing for switches after programfile
      -S              look for programfile using PATH environment variable
      -T              enable tainting checks
      -u              dump core after parsing program
      -U              allow unsafe operations
      -v              print version, subversion (includes VERY IMPORTANT perl info)
      -V[:variable]   print configuration summary (or a single Config.pm variable)
      -w              enable many useful warnings (RECOMMENDED)
      -W              enable all warnings
      -X              disable all warnings
      -x[directory]   strip off text before #!perl line and perhaps cd to directory
      

  4.   

    ppm install DBI
    Installing package 'DBI'...
    Error installing package 'DBI': Could not locate a PPD file for package DBI
      

  5.   

    to  okeyes(竹子):
    你的perl版本可能比较老了
    去下载最新的perl5.630
    在线安装perl模块(DBI)
    ppm install DBI
      

  6.   

    问题可能是这样的:
    你无法连接到activestate的Server
    也就是下面这里,所以它才会有那个提示,你搜索一下其他地方有没有。
    http://ppm.ActiveState.com/cgibin/PPM/ppmserver.pl?urn:/PPMServer或者你从ActiveState上把DBI.ppd下载下来。
    http://www.activestate.com/PPMPackages/5.6/
    然后手工修改一下那个文件,还要下载DBI的那个module。
    DBI.ppd的具体内容:
    <SOFTPKG NAME="DBI" VERSION="1,14,0,0">
    <TITLE>DBI</TITLE>
    <ABSTRACT>Database independent interface for Perl</ABSTRACT>
    <AUTHOR>Tim Bunce ([email protected])</AUTHOR>
    <IMPLEMENTATION>
    <OS NAME="MSWin32" />
    <ARCHITECTURE NAME="MSWin32-x86-multi-thread" />
    <CODEBASE HREF="http://www.activestate.com/PPMpackages/5.6/MSWin32-x86-multi-thread/DBI.tar.gz" />
    </IMPLEMENTATION><IMPLEMENTATION>
    <OS NAME="solaris" />
    <ARCHITECTURE NAME="sun4-solaris-thread-multi" />
    <CODEBASE HREF="http://www.activestate.com/PPMpackages/5.6/sun4-solaris-thread-multi/DBI.tar.gz" />
    </IMPLEMENTATION><IMPLEMENTATION>
    <OS NAME="linux" />
    <ARCHITECTURE NAME="i686-linux-thread-multi" />
    <CODEBASE HREF="http://www.activestate.com/PPMpackages/5.6/i686-linux-thread-multi/DBI.tar.gz" />
    </IMPLEMENTATION>
    </SOFTPKG>
    然后你就根据相应的URL把DBI的tar.gz给down下来,然后再把URL改成本地的。
    比如,这是我的DBI.ppd
    <SOFTPKG NAME="DBI" VERSION="1,14,0,0">
    <TITLE>DBI</TITLE>
    <ABSTRACT>Database independent interface for Perl</ABSTRACT>
    <AUTHOR>Tim Bunce ([email protected])</AUTHOR>
    <IMPLEMENTATION>
    <OS NAME="MSWin32" />
    <ARCHITECTURE NAME="MSWin32-x86-multi-thread" />
    <CODEBASE HREF="d:\downloads\DBI.tar.gz" />
    </IMPLEMENTATION><IMPLEMENTATION>
    <OS NAME="solaris" />
    <ARCHITECTURE NAME="sun4-solaris-thread-multi" />
    <CODEBASE HREF="http://www.activestate.com/PPMpackages/5.6/sun4-solaris-thread-multi/DBI.tar.gz" />
    </IMPLEMENTATION><IMPLEMENTATION>
    <OS NAME="linux" />
    <ARCHITECTURE NAME="i686-linux-thread-multi" />
    <CODEBASE HREF="http://www.activestate.com/PPMpackages/5.6/i686-linux-thread-multi/DBI.tar.gz" />
    </IMPLEMENTATION>
    </SOFTPKG>
    最后,ppm install d:\downloads\DBI.ppd
      

  7.   

    不过有一点应该明确的是,那个PPM是2。0版的,因为3。0BETA的会出错,根本用不了,