views:

1394

answers:

1

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

In Ubuntu 9.04 I am using:

sudo apt-get install php5-curl

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

+3  A: 

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

sudo port install php5-curl

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

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.

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.

Aftermathew
thanks a lot sir aftermathew for the quick response :)
marknt15
no problem sir @marknt15. Happy coding.
Aftermathew
install time remaining, less than a minute. - its been 15 minutes already. Hhmmm...
marknt15
There is an error aftermathew when installing php5-curl: $ sudo port install php5-curl---> Computing dependencies for php5-curlError: Unable to execute port: can't read "build.cmd": Failed to locate 'make' in path: '/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin' or at its MacPorts configuration time location, did you move it?
marknt15
Oh, I forgot to mention that you MUST have Apple Developer Tools (X Code Installed before you can use Mac Ports. Mac Ports uses Apple Developer Tools to build your packages. It appears you don't have make on your machine. Installing X Code Will give you make.
Aftermathew