如何从Github安装PHP扩展[关闭]

How do I install a PHP extension from Github onto my server. I'm testing out PHP7 and wanted to install https://github.com/mkoppanen/imagick/tree/phpseven but there is no documentation on how to install it on linux.

Probably a newbie question but would really appreciate the help.

Thank you!

If you're using phpbrew you can use the ext install command, like so:

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

By example:

# 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 :)