我在个人服务器上安装并配置了git,gitolite和gitweb,它在开始时工作正常,并且在我的存储库上有我的web视图。但是,当我试图安装的Bugzilla(与all perl dependencies)我对我的GitWeb URL的拉辛一个错误消息:在安装BugZilla perl依赖项后尝试配置gitweb时出现XML解析错误
XML Parsing Error: XML or text declaration not at start of entity Location: http://xxx.xxx.xx.xx/gitweb/ Line Number 22, Column 1:
生成的网页(萤火虫):
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<!-- git web interface version 1.7.10.4, (C) 2005-2006, Kay Sievers <[email protected]>, Christian Gierke -->
<!-- git core binaries version 1.7.10.4 -->
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8"/>
<meta name="generator" content="gitweb/1.7.10.4 git/1.7.10.4"/>
<meta name="robots" content="index, nofollow"/>
<title>xxx.xxx.xx.xx Git</title>
<link rel="stylesheet" type="text/css" href="static/gitweb.css"/>
<link rel="alternate" title="xxx.xxx.xx.xx Git projects list" href="/gitweb/?a=project_index" type="text/plain; charset=utf-8" />
<link rel="alternate" title="xxx.xxx.xx.xx Git projects feeds" href="/gitweb/?a=opml" type="text/x-opml" />
<link rel="shortcut icon" href="static/git-favicon.png" type="image/png" />
</head>
<body>
<div class="page_header">
<a href="http://git-scm.com/" title="git homepage"><img alt="git" class="logo" height="27" src="static/git-logo.png" width="72" /></a><a href="/gitweb/">projects</a>/</div>
<div class="projsearch">
Content-type: text/html
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<!-- git web interface version 1.7.10.4, (C) 2005-2006, Kay Sievers <[email protected]>, Christian Gierke -->
<!-- git core binaries version 1.7.10.4 -->
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8"/>
<meta name="generator" content="gitweb/1.7.10.4 git/1.7.10.4"/>
<meta name="robots" content="index, nofollow"/>
<title>xxx.xxx.xx.xx Git</title>
<link rel="stylesheet" type="text/css" href="static/gitweb.css"/>
<link rel="shortcut icon" href="static/git-favicon.png" type="image/png" />
</head>
<body>
<div class="page_header">
<a href="http://git-scm.com/" title="git homepage"><img alt="git" class="logo" height="27" src="static/git-logo.png" width="72" /></a><a href="/gitweb/">projects</a>/</div>
<div class="page_body">
<br /><br />
500 - Internal Server Error
<br />
<hr />
Can't locate object method "startform" via package "CGI" at /usr/share/gitweb/index.cgi line 5267.
</div>
<div class="page_footer">
<a class="rss_logo" href="/gitweb/?a=opml">OPML</a> <a class="rss_logo" href="/gitweb/?a=project_index">TXT</a>
</div>
<script type="text/javascript" src="static/gitweb.js"></script>
<script type="text/javascript">
window.onload = function() {
var tz_cookie = { name: 'gitweb_tz', expires: 14, path: '/' };
onloadTZSetup('local', tz_cookie, 'datetime');
};
</script>
</body>
</html>
我想这个错误是由于我试图安装BugZilla时安装的perl模块造成的。
如何卸载所有Perl模块并重新安装默认模块?
我使用Apache作为Web服务器。
有没有人有任何想法如何解决这个问题?
UPDATE1:
我的perl版本是:v5.14.2
CGI版本:4.21
这看起来像你缺少CGI。你安装了最新的Perl,现在是5.22吗? [CGI已从该版本的Perl核心中移除](http://perldoc.perl.org/perl5220delta.html#Removed-Modules-and-Pragmata),因此您需要从[CPAN](https:/ /metacpan.org/pod/distribution/CGI/lib/CGI.pod)。 – simbabque
使用CPAN: 数据库生成于2015年7月20日星期一12:29:02 GMT CGI是最新的(4.21)。 我的Perl版本: v5.14.2 –
什么版本的gitweb是?在最新版本中没有'gitweb/index.cgi',只有一个'index.perl'文件,te字符串'startform'不在该文件中。 [5267行也完全是其他](http://repo.or.cz/w/git.git/blob/HEAD:/gitweb/gitweb.perl#l5267)。 – simbabque