【发布时间】:2013-02-03 02:59:21
【问题描述】:
如何在 mac 上安装 gettext?
我在我的一个 php 页面上收到此错误:
Fatal error: Call to undefined function bindtextdomain()
这是因为我没有安装 gettext。
我找不到关于如何安装它的好的说明。我试过使用:
brew install gettext
它把一些文件放在这里:
/usr/local/Cellar/gettext/0.18.2
但我不知道该怎么办。
更新:现在我没有尝试使用自制软件,而是使用 wget 尝试了这种方法,但没有成功:
使用 wget 下载
cd ~/Downloads
wget http://ftp.gnu.org/gnu/gettext/gettext-0.18.2.tar.gz
tar -zxvf gettext-0.18.2.tar.gz
cd gettext-0.18.2
./configure
make
make check 对于运行自检是可选的
make check
我遇到的错误:
make[3]: *** [check-TESTS] 错误 1
make[2]: *** [check-am] 错误 2
make[1]: *** [check-recursive] 错误 1
sudo make install
安装在这里: /usr/local/share/gettext
这里的文档: /usr/local/share/doc/gettext
但是如何让我的 php 页面能够使用 gettext 和 bindtextdomain() 函数呢?
【问题讨论】: