天天看點

在centos中搭建bugzilla平台各種錯

1:

[[email protected] bugzilla]# perl -MCPAN -e shell
Can't locate CPAN.pm in @INC (@INC contains: /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .).
Check whether you have 'perl-CPAN‘ package installed in your system.
           

>>>>

CPAN是Comprehensive Perl Archive Network的縮寫.。它是一個巨大的Perl軟體收藏庫,收集了大量有用的Perl子產品(modules)及其相關的檔案。如果傳回上述資訊說明系統沒有安裝CPAN子產品。

查詢是否安裝CPAN子產品可以用:[[email protected] bugzilla]# rpm -q perl-CPAN

安裝CPAN指令:[[email protected] bugzilla]#yum -y install perl-CPAN

2:

[[email protected] conf]# service httpd restart
停止 httpd:                                               [确定]
正在啟動 httpd:httpd: apr_sockaddr_info_get() failed for zhm
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
           

>>>>

主要是ServerName沒有與localhost(即本地127.0.0.1)綁定,解決方法如下:

[[email protected] conf]#vim /etc/httpd/conf/httpd.conf

加入一句 ServerName localhost:80

3:

[[email protected] conf]#/usr/bin/perl install-module.pl XML::Twig
           

>>>>

一切顯示ok,但是checksetup.pl 查詢時卻顯示未安裝,可進行如下安裝:

/usr/bin/perl -MCPAN  -e 'install XML::Twig'

perl -MCPAN -e shell

install XML::Twig

或強制安裝

perl -MCPAN -e shell

force install XML::Twig

4:

/bin/sh: line 1: gcc: command not found
make: *** [GD.o] Error 127
/usr/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible
           

>>>>

說明沒有安裝gcc工具

其實判斷是否安裝gcc,最簡單方法是輸入gcc,未安裝的話會顯示指令沒找到,如果安裝了,一般顯示“gcc: 沒有輸入檔案”

如果安裝來gcc則:export CC=gcc

------

安裝gcc:

yum -y install gcc

yum -y install gcc-c++

yum install make    

--或者

yum groupinstall "Development Tools"

--或者

yum install gcc gcc-c++ kernel-devel

------

5:

Can't locate ExtUtils/Embed.pm in @INC (@INC contains: lib Apache-Test/lib /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .) at lib/Apache2/Build.pm line 27.
BEGIN failed--compilation aborted at lib/Apache2/Build.pm line 27.
Compilation failed in require at Makefile.PL line 37.
BEGIN failed--compilation aborted at Makefile.PL line 37.
Warning: No success on command[/usr/bin/perl Makefile.PL INSTALLDIRS=site]
  PHRED/mod_perl-2.0.7.tar.gz
  /usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK
Running make test
  Make had some problems, won't test
Running make install
  Make had some problems, won't install
Failed during this command:
 PHRED/mod_perl-2.0.7.tar.gz                  : writemakefile NO '/usr/bin/perl Makefile.PL INSTALLDIRS=site' returned status 51
           

>>>>

缺少必須的perl-ExtUtils-Embed子產品,安裝即可。

yum -y install perl-devel perl-ExtUtils-Embed

6:

Please provide a full path to 'apxs' executable
(press Enter if you don't have it installed):/etc/apache2/
>>如果路徑錯誤,則報
Please provide the location of the Apache directory: /etc/apache2/
[ error] Unable to open /etc/apache2//ap_release.h: No such file or directory
[ error] Unable to determine server version, aborting.
[ error] Please specify MP_APXS or MP_AP_PREFIX.
           

>>>>

一般這個錯說明apxs沒有安裝。apxs是apache的一個輔助工具軟體,它通常用來為apache安裝擴充子產品,甚至可以直接将.c的源程式自動編譯成.so程式,并能自動配置httpd.conf檔案,将新安裝的擴充添加到配置檔案中啟用。CentOS下安裝httpd的時候,預設是沒有這個工具的。要安裝apxs其實也簡單,隻需要安裝httpd-devel就可以了:

yum install httpd-devel

httpd-devel安裝完成之後,apxs工具預設會安裝在目錄:/usr/sbin/ 裡面。

檢視httpd-devel安裝的軟體相關路徑:rpm -ql httpd-devel

7:安裝XML::Twig時:

t/zz_dump_config.t .................. ok   

Test Summary Report
.......
t/xmlxpath_xpath_cond.t           (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: No plan found in TAP output
Files=101, Tests=72,  4 wallclock secs ( 0.29 usr  0.20 sys +  2.94 cusr  0.82 csys =  4.25 CPU)
Result: FAIL
Failed 96/101 test programs. 32/72 subtests failed.
make: *** [test_dynamic] 錯誤 255
  MIROD/XML-Twig-3.42.tar.gz
  /usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports MIROD/XML-Twig-3.42.tar.gz
Running make install
  make test had returned bad status, won't install without force
Failed during this command:
 MIROD/XML-Twig-3.42.tar.gz                   : make_test NO

           

>>>>

需要先安裝了mod_perl2,再安裝XML::Twig就不會報錯了。

8:

Can't find mod_perl installed
The error was: Can't locate mod_perl2.pm in @INC (@INC contains: /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .) at Makefile.PL line 149.
Warning: No success on command[/usr/bin/perl Makefile.PL INSTALLDIRS=site]
Warning (usually harmless): 'YAML' not installed, will not store persistent state
  PHRED/Apache-SizeLimit-0.96.tar.gz
  /usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK
Running make test
  Make had some problems, won't test
Running make install
  Make had some problems, won't install
Could not read '/root/.cpan/build/Apache-SizeLimit-0.96-UHFg3X/META.yml'. Falling back to other methods to determine prerequisites
Failed during this command:
 PHRED/Apache-SizeLimit-0.96.tar.gz  
           

>>>>

Apache2::SizeLimit無法安裝時,先裝mod_perl2就可以通過了。

9:

url通路: http://localhost報500到錯

>>>>

[[email protected] conf]#vim /etc/httpd/conf/httpd.conf

将AllowOverride Limit 改成 AllowOverride ALL

10:

url通路: http://localhost

Can't locate Moose.pm in @INC (@INC contains: ./Uniscan /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at Uniscan/Crawler.pm line 3.
BEGIN failed--compilation aborted at Uniscan/Crawler.pm line 3.
Compilation failed in require at ./uniscan.pl line 4.
BEGIN failed--compilation aborted at ./uniscan.pl line 4. 
           

或終端 ./checksetup.pl

Attempt to reload Math/Random/Secure.pm aborted.
Compilation failed in require at Bugzilla/Util.pm line 58.
BEGIN failed--compilation aborted at Bugzilla/Util.pm line 58.
Compilation failed in require at Bugzilla/Error.pm line 33.
BEGIN failed--compilation aborted at Bugzilla/Error.pm line 33.
Compilation failed in require at Bugzilla/Install/Filesystem.pm line 31.
BEGIN failed--compilation aborted at Bugzilla/Install/Filesystem.pm line 31.
Compilation failed in require at Bugzilla/Config.pm line 38.
BEGIN failed--compilation aborted at Bugzilla/Config.pm line 38.
Compilation failed in require at Bugzilla.pm line 38.
BEGIN failed--compilation aborted at Bugzilla.pm line 38.
Compilation failed in require at ./checksetup.pl line 102.
           

>>>>

說明缺少必須到Moose子產品,安裝即可:

# cpan -i Moose

11:

url通路 : http://localhost 報

Access denied for user ''@'localhost'
           

>>>>

說明user沒有通路資料庫到權限,要麼設定user到權限,要沒改配置,用root使用者。

12:

url通路 : http://localhost 報

Can't connect to the database.
Error: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
  Is your database installed and up and running?
  Do you have the correct username and password selected in localconfig?
           

>>>>

可能是MYSQL服務沒有啟動,(初始配置到時候更大可能是使用者名密碼錯誤)。

13:

url通路 : http://localhost 報"無法連接配接"時,一般是apache沒有啟動或者apache沒有裝好。

14:

Checking for                   GD (v1.20)     not found 
Checking for                Chart (v2.1)      not found 
Checking for          Template-GD (any)       not found 
Checking for           GDTextUtil (any)       not found 
Checking for              GDGraph (any)       not found 
           

>>

yum -y install gd-devel

yum -y install gd

繼續閱讀