macos 如何在 mac osx 雪豹中安装 php5 curl?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1513226/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 06:27:21  来源:igfitidea点击:

How to install php5 curl in mac osx snow leopard?

phpmacososx-snow-leopard

提问by marknt15

How can I install php5 curl module or any other php5 modules in mac osx snow leopard?

如何在 mac osx snow leopard 中安装 php5 curl 模块或任何其他 php5 模块?

In Ubuntu 9.04 I am using:

在 Ubuntu 9.04 中,我使用:

sudo apt-get install php5-curl

I already tried Googling but can't find some solution.

我已经尝试过谷歌搜索,但找不到一些解决方案。

回答by Aftermathew

I would install it via macports. Once you've installed mac ports, you can use it to build and then install php5 curl with the command

我会通过macports安装它。一旦你安装了 mac 端口,你就可以使用它来构建,然后使用命令安装 php5 curl

sudo port install php5-curl

I was able to determine what the mac ports package name was by using the ports search function:

通过使用端口搜索功能,我能够确定 mac 端口包名称是什么:

port search curl

Edit: You must have Apple Developer tools (X Code) installed on your machine for mac ports to work. X Code can be downloaded free from Apple. It also should be on your second Snow Leopard installation disc.

编辑:您的机器上必须安装 Apple Developer 工具(X 代码),mac 端口才能正常工作。X Code 可以从 Apple 免费下载。它也应该在您的第二张 Snow Leopard 安装光盘上。

As a developer working on Apple machines, I find ports indispensable. It's rare that I get through an entire project without relying on it for some dependency, especially when I am using a lot of open source libraries. It's worth spending some time looking around and seeing what else is in there.

作为在 Apple 机器上工作的开发人员,我发现端口是必不可少的。我很少在不依赖它的情况下完成整个项目,尤其是当我使用大量开源库时。值得花一些时间环顾四周,看看里面还有什么。