如何从 Github 安装 PHP 扩展

How do I install PHP extension from Github

如何将 Github 的 PHP 扩展安装到我的服务器上。我正在测试 PHP7 并想安装 https://github.com/mkoppanen/imagick/tree/phpseven,但没有关于如何在 linux 上安装它的文档。

可能是新手问题,但非常感谢您的帮助。

谢谢!

如果您使用的是 phpbrew,则可以使用 ext install 命令,如下所示:

$ phpbrew ext install <provider>:<organization>/<repository> <tag|branch>

举例:

# install imagic from 'phpseven' branch
$ phpbrew ext install github:mkoppanen/imagick phpseven

# install xdebug beta (compatible with PHP7)
$ phpbrew ext install github:xdebug/xdebug XDEBUG_2_4_0beta1

# install phalcon framework from 'phalcon-v2.0.8' tag
$ phpbrew ext install github:phalcon/cphalcon phalcon-v2.0.8

# install php-ast extension from master
$ phpbrew ext install github:nikic/php-ast

PS: I do help to maintain the phpbrew project and I'm not saying this is the only way to achieve what you asked. But it's certainly one of the easiest ways to try extensions and php versions once you have your environment set up :)