先说下为什么出现Perl模块安装失败,一般情况下网络上的Bugzilla安装教程都是通过网络进行的,网络安装的优势很明显,但同样的缺点也很明显,那就是对网络的依赖性高。依赖网络其实没啥不好的,但问题是你的网络质量很难保障安装过程不出问题,尤其是现在大多的PPM安装包的服务器都在国外。所以,我总结一下我的安装经历,希望对研究Bugzilla朋友有所帮助。

  1. 安装ActivePerl-5.14,若你已安装过了,可跳过此步骤;
  2. 添加Repository,默认的模块库:

ActiveState Package Repository

http://ppm4.activestate.com/MSWin32-x86/5.14/1402/package.xml

这样的地址,网上很多,基本上你找到的所有Bugzilla安装教程里面都会有包含。

在这里我碰到了一个问题:

无论是默认模块库,还是我手动添加的模块库,都会有一些模块无法安装。甚至有很多地址显示的模块数量为0。

解决办法:使用代理或VPN进行下载。已添加的地址可以点击黄色的小箱子,重新下载Pkgs list。一般情况下,只要有一个地址刷新出的Pkgs数量超过1万就够用了。

3. 使用ppm install <module_name>

OK,至此大部分安装包都装上了,但又碰到了另一个问题。

Email-MIME不能成功安装,提示:

Can't find any package that provides Email::Simple version 2 .102 for Email-MIME

解决办法:首先还是要感谢Google,我使用百度搜索了很久都没有结果,但使用Google很快就找到了答案。

原文链接:

https://groups.google.com/forum/?fromgroups=#!topic/mozilla.support.bugzilla/sYDmPKU7xi8

Email::Simple 2.102 is already available for ActivePerl:
Perl 5.16:
https://ppm4.activestate.com/MSWin32-x86/5.16/1600/R/RJ/RJBS/Email-Simple-2.102.ppmx
Perl 5.14:
https://ppm4.activestate.com/MSWin32-x86/5.14/1400/R/RJ/RJBS/Email-Simple-2.102.ppmx
Perl 5.12:
https://ppm4.activestate.com/MSWin32-x86/5.12/1200/R/RJ/RJBS/Email-Simple-2.102.ppmx
Download Email-Simple-2.102.ppmx, and them type:
ppm install Email-Simple-2.102.ppmx
And it will be correctly installed.

意思很简单,是因为我安装的Email-Simple-2.102的版本不对,重新安装匹配的版本即可。由于我安装的Perl版本是5.14,所以应使用

https://ppm4.activestate.com/MSWin32-x86/5.14/1400/R/RJ/RJBS/Email-Simple-2.102.ppmx 进行安装。

 

安装完成后,再执行ppm install Email-MIME就顺利通过了。

C:\xampp\htdocs\bugzilla>ppm install https://ppm4.activestate.com/MSWin32-x86/5.14/1400/R/RJ/RJBS/Email-Simple-2.102.ppmx

Unpacking Email-Simple-2.102...done

Generating HTML for Email-Simple-2.102...done

Updating files in site area...done

2 files unchanged

4 files updated

 

C:\xampp\htdocs\bugzilla>ppm install Email-MIME

Downloading Bugzilla packlist...not found

Downloading Email-MIME-1.911...done

Downloading Email-MessageID-1.402...done

Downloading MIME-Types-1.35...done

Downloading Email-MIME-Encodings-1.313...done

Downloading Email-MIME-ContentType-1.015...done

Unpacking Email-MIME-1.911...done

Unpacking Email-MessageID-1.402...done

Unpacking MIME-Types-1.35...done

Unpacking Email-MIME-Encodings-1.313...done

Unpacking Email-MIME-ContentType-1.015...done

Generating HTML for Email-MIME-1.911...done

Generating HTML for Email-MessageID-1.402...done

Generating HTML for MIME-Types-1.35...done

Generating HTML for Email-MIME-Encodings-1.313...done

Generating HTML for Email-MIME-ContentType-1.015...done

Updating files in site area...done

20 files installed

 

C:\xampp\htdocs\bugzilla>

 

最后再执行一遍Bugzilla目录里的Check setup.pl,所有模块都正常安装了。

C:\xampp\htdocs\bugzilla>checksetup.pl
* This is Bugzilla 4.2.2 on perl 5.14.2
* Running on Win7 Build 7601 (Service Pack 1)

Checking perl modules...
Checking for CGI.pm (v3.51) ok: found v3.59
Checking for Digest-SHA (any) ok: found v5.62
Checking for TimeDate (v2.21) ok: found v2.24
Checking for DateTime (v0.28) ok: found v0.76
Checking for DateTime-TimeZone (v0.79) ok: found v1.48
Checking for DBI (v1.614) ok: found v1.616
Checking for Template-Toolkit (v2.22) ok: found v2.24
Checking for Email-Send (v2.16) ok: found v2.198
Checking for Email-MIME (v1.904) ok: found v1.911
Checking for URI (v1.37) ok: found v1.59
Checking for List-MoreUtils (v0.22) ok: found v0.33
Checking for Math-Random-ISAAC (v1.0.1) ok: found v1.004
Checking for Win32 (v0.35) ok: found v0.44
Checking for Win32-API (v0.55) ok: found v0.64

Checking available perl DBD modules...
Checking for DBD-Pg (v1.45) ok: found v2.18.1
Checking for DBD-mysql (v4.001) not found
Checking for DBD-SQLite (v1.29) ok: found v1.33
Checking for DBD-Oracle (v1.19) ok: found v1.30

The following Perl modules are optional:
Checking for GD (v1.20) ok: found v2.46
Checking for Chart (v2.1) not found
Checking for Template-GD (any) not found
Checking for GDTextUtil (any) ok: found v0.86
Checking for GDGraph (any) ok: found v1.44
Checking for MIME-tools (v5.406) not found
Checking for libwww-perl (any) ok: found v6.02
Checking for XML-Twig (any) not found
Checking for PatchReader (v0.9.6) not found
Checking for perl-ldap (any) not found
Checking for Authen-SASL (any) not found
Checking for RadiusPerl (any) not found
Checking for SOAP-Lite (v0.712) not found
Checking for JSON-RPC (any) not found
Checking for JSON-XS (v2.0) not found
Checking for Test-Taint (any) not found
Checking for HTML-Parser (v3.67) ok: found v3.68
Checking for HTML-Scrubber (any) not found
Checking for Encode (v2.21) ok: found v2.44
Checking for Encode-Detect (any) not found
Checking for Email-MIME-Attachment-Stripper (any) not found
Checking for Email-Reply (any) not found
Checking for TheSchwartz (any) not found
Checking for Daemon-Generic (any) not found
Checking for mod_perl (v1.999022) not found
Checking for Apache-SizeLimit (v0.96) not found
***********************************************************************
* OPTIONAL MODULES *
***********************************************************************
* Certain Perl modules are not required by Bugzilla, but by *
* installing the latest version you gain access to additional *
* features. *
* *
* The optional modules you do not have installed are listed below, *
* with the name of the feature they enable. Below that table are the *
* commands to install each module. *
***********************************************************************
* MODULE NAME * ENABLES FEATURE(S) *
***********************************************************************
* Chart * New Charts, Old Charts *
* Template-GD * Graphical Reports *
* MIME-tools * Move Bugs Between Installations *
* XML-Twig * Move Bugs Between Installations, Automatic Up
date Notifications *
* PatchReader * Patch Viewer *
* perl-ldap * LDAP Authentication *
* Authen-SASL * SMTP Authentication *
* RadiusPerl * RADIUS Authentication *
* SOAP-Lite * XML-RPC Interface *
* JSON-RPC * JSON-RPC Interface *
* JSON-XS * Make JSON-RPC Faster *
* Test-Taint * JSON-RPC Interface, XML-RPC Interface *
* HTML-Scrubber * More HTML in Product/Group Descriptions *
* Encode-Detect * Automatic charset detection for text attachme
nts *
* Email-MIME-Attachment-Stripper * Inbound Email *
* Email-Reply * Inbound Email *
* TheSchwartz * Mail Queueing *
* Daemon-Generic * Mail Queueing *
* mod_perl * mod_perl *
* Apache-SizeLimit * mod_perl *
***********************************************************************
COMMANDS TO INSTALL OPTIONAL MODULES:

Chart: ppm install Chart
Template-GD: ppm install Template-GD
MIME-tools: ppm install MIME-tools
XML-Twig: ppm install XML-Twig
PatchReader: ppm install PatchReader
perl-ldap: ppm install perl-ldap
Authen-SASL: ppm install Authen-SASL
RadiusPerl: ppm install RadiusPerl
SOAP-Lite: ppm install SOAP-Lite
JSON-RPC: ppm install JSON-RPC
JSON-XS: ppm install JSON-XS
Test-Taint: ppm install Test-Taint
HTML-Scrubber: ppm install HTML-Scrubber
Encode-Detect: ppm install Encode-Detect
Email-MIME-Attachment-Stripper: ppm install Email-MIME-Attachment-Stripper
Email-Reply: ppm install Email-Reply
TheSchwartz: ppm install TheSchwartz
Daemon-Generic: ppm install Daemon-Generic
mod_perl: ppm install mod_perl
Apache-SizeLimit: ppm install Apache-SizeLimit

Reading ./localconfig...

OPTIONAL NOTE: If you want to be able to use the 'difference between two
patches' feature of Bugzilla (which requires the PatchReader Perl module
as well), you should install patchutils from:

http://cyberelk.net/tim/patchutils/
This version of Bugzilla contains some variables that you may want to
change and adapt to your local settings. The following variables are
new to ./localconfig since you last ran checksetup.pl:

create_htaccess, webservergroup, use_suexec, db_driver, db_host,
db_name, db_user, db_pass, db_port, db_sock, db_check, index_html,
cvsbin, interdiffbin, diffpath, site_wide_secret

Please edit the file ./localconfig and then re-run checksetup.pl
to complete your installation.
C:\xampp\htdocs\bugzilla>