尝试安装 pecl 扩展时在 mac os x 10.7.3 上出现 $PHP_AUTOCONF 错误

发布于 2025-01-06 01:43:55 字数 736 浏览 2 评论 0原文

我正在尝试使用 pecl_http 和 memcache 设置我的机器,在这两种情况下,我都会遇到类似的错误。这是在 MAC OS X 10.7.3 (lion) 上,我也在上面安装了 XCODE。在运行这些命令之前,我还安装了 Zend Server 社区版,并设置了 CFLAGS='-arch i386 -arch x86_64' 环境变量。所以请帮助我完成我需要做的事情

bash-3.2# **sudo pecl install pecl_http-1.7.1**
downloading pecl_http-1.7.1.tgz ...
Starting to download pecl_http-1.7.1.tgz (174,098 bytes)
.....................................done: 174,098 bytes
71 source files, building
running: phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.
ERROR: `phpize' failed

I am trying to setup my machine with pecl_http and memcache and in both cases, I get similar errors. This is on MAC OS X 10.7.3 (lion) and I also have XCODE installed on it. I also installed Zend Server community edition before running these commands and have CFLAGS='-arch i386 -arch x86_64' environment variables set. So please help with what I need to do

bash-3.2# **sudo pecl install pecl_http-1.7.1**
downloading pecl_http-1.7.1.tgz ...
Starting to download pecl_http-1.7.1.tgz (174,098 bytes)
.....................................done: 174,098 bytes
71 source files, building
running: phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.
ERROR: `phpize' failed

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

月亮是我掰弯的 2025-01-13 01:43:56

您需要安装自动配置。我通常喜欢从源代码安装库。所以你可以执行以下操作:

curl -OL http://ftpmirror.gnu.org/autoconf/autoconf-latest.tar.gz
tar xzf autoconf-latest.tar.gz
cd autoconf-*
./configure --prefix=/usr/local
make
sudo make install

我刚刚和 Mountain Lion 经历过这个。

You need to install autoconfig. I usually like to install libraries from source. So you can do the following:

curl -OL http://ftpmirror.gnu.org/autoconf/autoconf-latest.tar.gz
tar xzf autoconf-latest.tar.gz
cd autoconf-*
./configure --prefix=/usr/local
make
sudo make install

I just went through this with Mountain Lion.

执笏见 2025-01-13 01:43:56

Mac OS X 10.8 上的情况略有不同。 Bob Spryn 高度投票的解决方案不起作用,因为它不会创建符号链接,因此在安装 autoconf 后,您应该制作它们:

sudo ln -s /usr/local/Cellar/autoconf/2.69/bin/autoconf /usr/bin/autoconf
sudo ln -s /usr/local/Cellar/autoconf/2.69/bin/autoheader /usr/bin/autoheader

我知道这个问题是针对 10.7 的,但我希望我的答案是对于 10.8 版本的人有用。 :)

更新:也适用于 10.10 Yosemite。

On Mac OS X 10.8 situation is slightly different. Highly voted solution from Bob Spryn doesn't work, because it doesn't create symlinks, so after installing autoconf you should make them:

sudo ln -s /usr/local/Cellar/autoconf/2.69/bin/autoconf /usr/bin/autoconf
sudo ln -s /usr/local/Cellar/autoconf/2.69/bin/autoheader /usr/bin/autoheader

I know that this question was for 10.7, but I hope my answer is useful for someone on 10.8. :)

Updated: Also works on 10.10 Yosemite.

旧梦荧光笔 2025-01-13 01:43:56

或者

sudo port install autoconf

如果你使用 macports

or

sudo port install autoconf

if you use macports

轻许诺言 2025-01-13 01:43:56

XCODE 4.3 不会将所有 autoconf 等工具放在 Developer 文件夹中。它甚至不会在 MACINTOSH HD 中创建该文件夹。我必须降级到 XCODE 4.2.1,它会在 Developer 文件夹中安装您需要的所有内容,现在我没有看到任何错误。

这里还有一个有用的参考

XCODE 4.3 doesn't put all the autoconf etc. tools in the Developer folder. It doesn't even create that folder in MACINTOSH HD. I had to downgrade to XCODE 4.2.1 which installs everything you need in the Developer folder and now I see no errors.

Also here is a useful reference.

心安伴我暖 2025-01-13 01:43:56

也许您需要使用 brew link autoconf 链接 autoconf。

maybe you need link autoconf with brew link autoconf.

妞丶爷亲个 2025-01-13 01:43:55
brew install autoconf

更简单的解决方案

brew install autoconf

Much easier solution

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文