在 64 位 Windows 7 上安装 Trac
我正在配置 Windows 7 64 位附带的新开发服务器。
它必须安装带有 Subversion 集成的 Trac。
我安装 Subversion 和 VisualSVN 2.1.1,客户端安装 TortoiseSVN 1.6.7 和 AnkhSVN 2.1.7 以进行 Visual Studio 2008 SP1 集成。
一切正常!我的问题是在安装 Trac 时出现的。
我安装 python 2.6 一切正常。 Trac 没有 x64 Windows 安装程序,因此我通过使用 python 控制台(C:\Python26\python.exe C:/TRAC/setup.py install)编译来手动安装它。 之后,我可以正常创建TRAC项目,Trac核心工作正常。那么问题就开始了,让我们看一下Trac INSTALL文件:
要求
要安装Trac,必须安装以下软件包:
- Python,版本≥2.3。
- Subversion,版本>=1.0。 (>= 1.1.x推荐)
- Subversion SWIG Python 绑定(不是 PySVN)。
- PySQLite,版本 1.x(对于 SQLite 2.x)或版本 2.x(对于 SQLite 3.x)
- Clearsilver,版本 >= 0.9.3(推荐 0.9.14)
Python:OK
Subverion:OK
Subversion SWIG Python 绑定(不是 PySVN): 这里我遇到了第一个问题,他要求我“cd”到swig目录并运行“configure”文件,结果是:
C:\swigwin-1.3.40> c:\python26\python.exe configure
File "configure", line 16
DUALCASE=1; export DUALCASE # for MKS sh
^
SyntaxError: invalid syntax
PySQLite,版本1.x(对于SQLite 2.x)或版本2.x(对于 SQLite 3.x): 不需要,因为Python 2.6附带了SQLLite
Clearsilver,版本> = 0.9.3(推荐0.9.14): 第二个问题,Clearsilver 只有 32 位安装程序,无法识别 python 安装(因为注册表项位于 32 位到 64 位的不同位置)。 所以我尝试使用 python 控制台手动安装它。它返回给我一个与 SWIG 相同类型的错误:
C:\clearsilver-0.10.5>C:\python26\python.exe ./configure
File "./configure", line 13
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
^
SyntaxError: invalid syntax
当我使用“TRACD”命令模拟 Web 服务器时,当我禁用 svn 支持时它运行良好,但当我尝试打开网页时,它向我显示有关 ClearSilver 的错误未安装用于生成 html 内容。
并且(让我更高兴)这个 TRAC 将在 IIS7 上运行,我不能安装 Apache...
我对这个问题几乎发疯了...帮助!
I'm configuring a new Developing Server that came with Windows 7 64bits.
It must have installed Trac with Subversion integration.
I install Subversion with VisualSVN 2.1.1, clients with TortoiseSVN 1.6.7 and AnkhSVN 2.1.7 for Visual Studio 2008 SP1 integration.
All works fine! my problem begun when going to Trac installation.
I install python 2.6 all fine.
Trac hasn't a x64 windows installer, so I installed it manually by compiling it with python console (C:\Python26\python.exe C:/TRAC/setup.py install).
After that, I can create TRAC projects normally, the Trac core is working fine. And so the problem begins, lets take a look at the Trac INSTALL file:
Requirements
To install Trac, the following software packages must be installed:
- Python, version >= 2.3.
- Subversion, version >= 1.0. (>= 1.1.xrecommended)
- Subversion SWIG Python bindings (not PySVN).
- PySQLite,version 1.x (for SQLite 2.x) or version 2.x (for SQLite 3.x)
- Clearsilver, version >= 0.9.3 (0.9.14 recommended)
Python: OK
Subverion: OK
Subversion SWIG Python bindings (not PySVN):
Here I face the first issue, he asks me for 'cd' to the swig directory and run the 'configure' file, and the result is:
C:\swigwin-1.3.40> c:\python26\python.exe configure
File "configure", line 16
DUALCASE=1; export DUALCASE # for MKS sh
^
SyntaxError: invalid syntax
PySQLite, version 1.x (for SQLite 2.x) or version 2.x (for SQLite 3.x):
Don't need, as Python 2.6 comes with SQLLite
Clearsilver, version >= 0.9.3 (0.9.14 recommended):
Second issue, Clearsilver only has 32bit installer wich does not recognize python installation (as registry keys are in different places from 32 to 64 bits).
So I try to manually install it with python console. It returns me a error of the same kind as SWIG:
C:\clearsilver-0.10.5>C:\python26\python.exe ./configure
File "./configure", line 13
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
^
SyntaxError: invalid syntax
When I simulate a web server using the "TRACD" command, it runs fine when I disable svn support but when I try to open the web page it shows me a error regarding ClearSilver is not installed for generating the html content.
AND (for making me more happy) This TRAC will run over IIS7, I mustn't install Apache...
I'm nearly crazy with this issue... HELP!!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
只需将 Register 从 [HKEY_LOCAL_MACHINE\SOFTWARE\Python] 导出到 [HKEY_CURRENT_USER\Software\Python] 即可。
发生这种情况是因为 trac 只看到 [HKEY_CURRENT_USER\Software\Python] 并且您安装了“对于所有用户”的 python
Just export Register from [HKEY_LOCAL_MACHINE\SOFTWARE\Python] to [HKEY_CURRENT_USER\Software\Python].
It's happens because trac only see the [HKEY_CURRENT_USER\Software\Python] and you installed the python "For all users"
我希望 Trac on Windows 指令应该在 x64 上工作,即使它们是 32-位包。你尝试过这个但失败了吗?
Subversion SWIG Python 绑定:
configure
并不意味着由 Python 运行;它应该与 POSIX sh 一起运行,例如 Bash 或 ksh。但是,如果您阅读 subversion/bindings/swig /INSTALL你会发现Windows的安装说明不使用configure
;相反,使用 Visual Studio 和 gen-make.py。请注意,您的绑定应该与您安装的 Subversion 相匹配。
Clearsilver:
同样,
configure
适用于 sh,而不是 Python。适用于 Windows 的 Clearsilver 编译说明可在 clearsilver/python 中找到/README.txt。I would expect that Trac on Windows instructions should work on x64, even if they're 32-bit packages. Have you tried this and failed?
Subversion SWIG Python bindings:
configure
is not meant to be run by Python; it's meant to be run with a POSIX sh, like Bash or ksh. However, if you read subversion/bindings/swig/INSTALL you'll find that the installation instructions for Windows do not useconfigure
; instead, Visual Studio andgen-make.py
are used.Note that your bindings should match your installed Subversion.
Clearsilver:
Likewise,
configure
is meant for a sh, not Python. Clearsilver compilation instructions for Windows can be found in clearsilver/python/README.txt.看来我不是唯一一个尝试在 Win 7 64 位上安装 Trac 的人,结果却发现安装崩溃了。
一个问题是 Win x64 上缺少已安装的 Python 注册表项,我可以通过网络搜索找到该注册表项。该问题是在几个月前发现的,但不幸的是尚未发布任何补丁版本。
我几乎准备放弃 Trac,但这里的信息给了我新的希望。谢谢大家!
Looks like I'm not the only one trying to install Trac on Win 7 64-bit, only to see the install crash and burn.
One problem is the lack of installed registry entries for Python on Win x64, which I was able to find via a web search. The problem was identified months ago, but unfortunately no patch release has been made available.
I was almost ready to give up on Trac, but the information here has given me new hope. Thanks all!