git 编译器错误 - 找不到 msgfmt 命令
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9500898/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Compiler error - msgfmt command not found
提问by John
I'm trying to update Git from my shared hosting. For that I'm following these steps:
我正在尝试从我的共享主机更新 Git。为此,我正在执行以下步骤:
- Download latest Git version
- Unpack and place it on the server
- Configure and create the Makefile ->
./configure --prefix=$HOME/dev/git/src --without-tcltk
- Build the package ->
make
thenmake install
- Update PATH .bash_profile
- 下载最新的 Git 版本
- 解压并放到服务器上
- 配置并创建 Makefile ->
./configure --prefix=$HOME/dev/git/src --without-tcltk
- 构建包 ->
make
然后make install
- 更新路径 .bash_profile
I'm stuck at point 4. When I run the make
command, I get the following:
我被困在第 4 点。当我运行make
命令时,我得到以下信息:
user@ssh1:~/dev/git/src$ make
SUBDIR gitweb
SUBDIR ../
make[2]: ? GIT-VERSION-FILE ? est ? jour.
GEN git-instaweb
SUBDIR perl
SUBDIR git_remote_helpers
SUBDIR templates
MSGFMT po/build/locale/is/LC_MESSAGES/git.mo
/bin/sh: msgfmt: command not found
make: *** [po/build/locale/is/LC_MESSAGES/git.mo] Erreur 127
Compiler throws a msgfmt command not found
error.
编译器抛出msgfmt command not found
错误。
I Googled it and it seems to be related to the gettext package.
我用谷歌搜索,它似乎与 gettext 包有关。
Any idea how to fix that error on a shared hosting?
知道如何在共享主机上修复该错误吗?
回答by Bob F.
I had the same issue. Thanks to your work on finding it was related to gettext, a simple apt-get install gettext
fixed it for me.
我遇到过同样的问题。感谢您发现它与 gettext 相关的工作,简单地apt-get install gettext
为我修复了它。
回答by Max Leske
While building Git with Xcode (using Makefile), I had to define NO_GETTEXT = YesPlease
in the Makefile to resolve this issue.
在使用 Xcode(使用 Makefile)构建 Git 时,我必须NO_GETTEXT = YesPlease
在 Makefile 中定义以解决此问题。
回答by Manbeardo
msgfmt
is included in the gettext-devel
cygwin package. Install that (via setup.exe or apt-cyg
) and the error should go away.
msgfmt
包含在gettext-devel
cygwin 包中。安装它(通过 setup.exe 或apt-cyg
),错误应该会消失。
回答by ludovico
On Mac Os, this worked for me:
在 Mac Os 上,这对我有用:
brew install gettext
brew link gettext --force
回答by Vijay Kumar Kanta
make -i
make -i install
..worked flawlessy for this problem. Also if anyone's having trouble with http/https helper, during configure do not forget to add the following thing
..完美解决这个问题。另外,如果有人在使用 http/https 助手时遇到问题,请在配置期间不要忘记添加以下内容
./configure --with-curl --with-expat
回答by ads1690
On cygwin, you need to install the gettext-devel package as well. The gettext package alone is not enough to resolve this problem.
在 cygwin 上,您还需要安装 gettext-devel 包。单靠 gettext 包不足以解决这个问题。
回答by Wilhem Meignan
You can install gettext in the same way you are installing git. By downloading, extracting, building and installing it to a given location in your home folder:
你可以像安装 git 一样安装 gettext。通过下载、解压缩、构建并将其安装到您的主文件夹中的给定位置:
curl -O https://ftp.gnu.org/pub/gnu/gettext/gettext-0.20.1.tar.gz
tar xvf gettext-0.20.1.tar.gz
cd gettext-0.20.1/
./configure --prefix=/home/$HOME/opt
make
make install
Set the prefix to the location you want for the installation.
将前缀设置为您想要的安装位置。
回答by YaOzI
回答by Umair A.
Try to add -ito your make command.
尝试将-i添加到您的 make 命令中。
> make -i ...
> make -i ...