本文介绍了Django 1.3.1的编译消息。错误:sh:msgfmt:命令未找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

./manage.py compilemessages 

抛出此错误:

sh: msgfmt: command not found

我正在运行Mac OS 10.7,我找不到msgfmt程序的下载路径。有没有办法解决这个问题?

I am running Mac OS 10.7, and I can't find the download path for the msgfmt program. Is there any way to resolve this problem?

提前感谢

推荐答案

[更新] TLDR;正如Dogukan所言:Mac OS Maverics brew install gettext; brew link gettext --force 为我工作。

[update] TLDR; as Dogukan commented: Mac OS Maverics brew install gettext; brew link gettext --force worked for me.

[更新]用户Lajarre报道:截至今天(2014年3月),我不得不做 brew install msgpack

[update] user Lajarre reported: as of today (March 2014), I had to do brew install msgpack.

您需要GNU gettext和gettext-tools。

You need GNU gettext and gettext-tools.

如果您使用fink,请尝试:

If you use fink, try:

sudo fink install gettext-tools

如果还没有,您可能需要向您的PATH添加 / sw / bin /

You may need to add /sw/bin/ to your PATH if it is not there yet.

如果不使用fink,请尝试brew:

If you don't use fink, try brew:

brew install gettext
brew link gettext

[更新]从Dave和Jason建议的brew示例中删除sudo调用。

[update] removed sudo call from the brew example as suggested by Dave and Jason.

这篇关于Django 1.3.1的编译消息。错误:sh:msgfmt:命令未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-16 09:59