1. 程式人生 > >Bugzilla:安裝Perl 模組失敗的解決辦法

Bugzilla:安裝Perl 模組失敗的解決辦法

先說下為什麼出現Perl模組安裝失敗,一般情況下網路上的Bugzilla安裝教程都是通過網路進行的,網路安裝的優勢很明顯,但同樣的缺點也很明顯,那就是對網路的依賴性高。依賴網路其實沒啥不好的,但問題是你的網路質量很難保障安裝過程不出問題,尤其是現在大多的PPM安裝包的伺服器都在國外。所以,我總結一下我的安裝經歷,希望對研究Bugzilla朋友有所幫助。

  1. 安裝ActivePerl-5.14,若你已安裝過了,可跳過此步驟;
  2. 新增Repository,預設的模組庫:

ActiveState Package Repository

這樣的地址,網上很多,基本上你找到的所有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很快就找到了答案。

原文連結:

意思很簡單,是因為我安裝的Email-Simple-2.102的版本不對,重新安裝匹配的版本即可。由於我安裝的Perl版本是5.14,所以應使用

安裝完成後,再執行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>