php 在 Mac OS X 10.6 上安装 PECL
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5536195/
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
Install PECL on Mac OS X 10.6
提问by Manne W
Is there any way to install PHP:s PECL handler on Mac OS X 10.6, to be used with the bundled PHP?
有没有办法在 Mac OS X 10.6 上安装 PHP:s PECL 处理程序,以与捆绑的 PHP 一起使用?
回答by numberwhun
Better late than never, but if you are like me and installed PHP directly from php.net (instead of using something like Homebrew or Port, then you can simply follow the following link to install Pear and PECL:
迟到总比不到好,但如果你像我一样直接从 php.net 安装 PHP(而不是使用 Homebrew 或 Port 之类的东西,那么你可以简单地按照以下链接安装 Pear 和 PECL:
http://akrabat.com/php/setting-up-php-mysql-on-os-x-10-7-lion/
http://akrabat.com/php/setting-up-php-mysql-on-os-x-10-7-lion/
We need PEAR! For some reason, it's not set up ready to on Lion, but the install phar file is here, so we just need to run it.
cd /usr/lib/php sudo php install-pear-nozlib.phar Edit: /etc/php.ini and find the line: ; include_path = ".:/php/includes" and change it to: include_path = ".:/usr/lib/php/pear" sudo pear channel-update pear.php.net sudo pecl channel-update pecl.php.net sudo pear upgrade-all
我们需要梨!出于某种原因,它没有准备好在 Lion 上设置,但安装 phar 文件在这里,所以我们只需要运行它。
cd /usr/lib/php sudo php install-pear-nozlib.phar Edit: /etc/php.ini and find the line: ; include_path = ".:/php/includes" and change it to: include_path = ".:/usr/lib/php/pear" sudo pear channel-update pear.php.net sudo pecl channel-update pecl.php.net sudo pear upgrade-all
It worked fine for me.
它对我来说很好。
回答by kenorb
Try installing it via:
尝试通过以下方式安装:
bash <(curl -s http://php-osx.liip.ch/install.sh)
Or install by hand:
或者手动安装:
curl -s -o /tmp/packager.tgz http://php-osx.liip.ch/packager/packager.tgz
sudo tar -C /usr/local -xzf /tmp/packager.tgz
Then install packer:
然后安装打包程序:
sudo /usr/local/packager/packager.py install 5.4-frontenddev
otherwise update it via:
否则通过以下方式更新它:
sudo /usr/local/packager/packager.py install tools-frontenddev # Ignore