【问题标题】:Mercurial http interface under Ubuntu Hardy. Doesn't workUbuntu Hardy 下的 Mercurial http 接口。不工作
【发布时间】:2010-08-26 13:55:01
【问题描述】:

我正在尝试在 Ubuntu 8.04 下部署 mercurial。 Mercurial 软件包已正确安装,但是当我配置 http 接口时,我总是收到 500 错误。

我启用了将调试信息输出到 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")

但无论如何它都不起作用。

我该怎么办??

谢谢。

【问题讨论】:

    标签: python ubuntu mercurial


    【解决方案1】:

    您使用的是哪个版本的 Mercurial?如果您仍在使用 ubuntu 发布的 1.0.x,请从启动板更新到 PPA:https://launchpad.net/~mercurial-ppa/+archive/stable-snapshots

    在 1.6 中,hgwebdir 已重命名为“hgweb”,这会稍微改变您的配置。

    还有你用什么启动wsgi的东西?阿帕奇?

    【讨论】:

    • 我查了一下,版本是0.9.5。我从存储库安装它 sudo aptitude install mercurial 是的,我正在尝试使用 apache2-mod-wsgi 配置 Apache。是否应从启动板重新安装 mercurial?
    • 0.9.5 已经过时了。从启动板尝试 1.6.x;它适用于 ubuntu。我一眨眼就可以使用 Apache。
    • 谢谢,它有效!我清除现有的 mercurial,然后从 ppa 获取 mercurial 1.6,并从 /usr/share/doc/mercurial/examples/hgweb.wsgi 替换我的 hgweb.wsgi。在这个 wsgi 脚本中,我只更改了配置的路径。它有效!非常感谢!
    • 好交易。我真的希望 ubuntu 能快点从 PPA 中引入去年构建的版本,但我不知道这个过程/决定是如何结束的。
    猜你喜欢
    • 2010-09-07
    • 1970-01-01
    • 1970-01-01
    • 2014-08-29
    • 2019-05-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-06-19
    相关资源
    最近更新 更多