2010-08-26 49 views
1

我想在Ubuntu 8.04下部署mercurial。 Mercurial软件包安装正确,但是当我配置http界面时,我总是得到500错误。Ubuntu Hardy下的Mercurial http界面。不起作用

我能输出调试信息到是error.log并获得:

mod_wsgi (pid=21159): Exception occurred within WSGI script 
'/home/hg/rep/hgwebdir.wsgi'. 
Traceback (most recent call last): 
File "/home/hg/rep/hgwebdir.wsgi", line 67, in <module> 
wsgicgi.launch(application) 
File "/var/lib/python-support/python2.5/mercurial/hgweb/wsgicgi.py", line 64, in launch 
result = application(environ, start_response) 
TypeError: 'hgwebdir' object is not callable 

我的台式机是与Ubuntu 10.04,并与Ubuntu的9.10,并配置家庭服务器是一样的,就像一个魅力。

我编写Python 2.6中,并在hgwebdir.wsgi把路径到此库 -

import sys 
sys.path.insert(0, "/path/to/python/lib") 

但它不反正工作。

我该怎么办?

谢谢。

回答

1

您正在使用哪个版本的mercurial?如果您仍在使用ubuntu从launchpad更新到PPA的1.0.x版本:https://launchpad.net/~mercurial-ppa/+archive/stable-snapshots

1.6 hgwebdir已更名为'hgweb',它将稍微改变您的配置。

你还在用什么启动wsgi的东西? Apache的?

+0

我查过了,版本是0.9.5。我从知识库中安装它 sudo aptitude install mercurial 是的,我试图用apache2-mod-wsgi配置Apache。 应该从启动板重新安装mercurial吗? – maectpo 2010-08-26 22:03:03

+1

0.9.5老得可怕。从发射台尝试1.6.x;它与Ubuntu的工作很好。我一直在与Apache合作。 – 2010-08-27 06:19:26

+0

谢谢,它的工作原理! 我清除现有的mercurial,然后从ppa中获取mercurial 1.6,并从/usr/share/doc/mercurial/examples/hgweb.wsgi中替换我的hgweb.wsgi。 在这个wsgi脚本中,我只更改了我的配置路径。 它的工作原理! 非常感谢! – maectpo 2010-08-27 14:47:15