Django 1.3.1 compilemessages. Error: sh: msgfmt: command not found

∥☆過路亽.° 提交于 2020-01-20 03:51:25

问题


./manage.py compilemessages 

throws this error:

sh: msgfmt: command not found

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?

Thanks in advance!


回答1:


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

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

You need GNU gettext and gettext-tools.

If you use fink, try:

sudo fink install gettext-tools

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

If you don't use fink, try brew:

brew install gettext
brew link gettext

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




回答2:


Paulo Scardine's answer is perfect, but after I executed 'sudo brew link gettext' I got an error message.

Error: Cowardly refusing to `sudo brew link' You can use brew with sudo, but only if the brew executable is owned by root. However, this is both not recommended and completely unsupported so do so at your own risk.

It's easy to handle it, just remove 'sudo'

brew install gettext

brew link gettext



来源:https://stackoverflow.com/questions/8784974/django-1-3-1-compilemessages-error-sh-msgfmt-command-not-found

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!