Showing posts with label homebrew. Show all posts
Showing posts with label homebrew. Show all posts

Disable Homebrew Auto Update

Tags: November 24, 2020 8:10 AM
0 comments

Homebrew will do self update when we install a package. Sometimes this is not what we want. We are okay using an old version of Homebrew and some old packages.

To prevent Homebrew doing automatic update just set an environment variable named `HOMEBREW_NO_AUTO_UPDATE`.

$ HOMEBREW_NO_AUTO_UPDATE=1 brew install [PACKAGE]
<link crossorigin='anonymous' href='https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/styles/shCoreDefault.min.css' integrity='sha256-+6BtzNuRjIOAeRxs56BdQS0n2/5w5HLMEoJsXdMP5TI=' rel='stylesheet'/>

References

Share on Facebook Twitter

Compile Swoole Extension on MacOS using Homebrew

Tags: July 29, 2019 10:59 PM
0 comments

What is Swoole

Swoole is Production-Grade Async programming Framework for PHP. It helps you write high-performance asynchronous non-blocking I/O. Similar with Go or NodeJS.

How to Compile using Homebrew

I am using MacOS High Sierra and PHP 7.2.20.

$ export LD_LIBRARY_PATH=$( brew --prefix openssl )/lib
$ export CPATH=$( brew --prefix openssl)/include
$ export PKG_CONFIG_PATH=$( brew --prefix openssl )/lib/pkgconfig
$ pecl install swoole
...
Configuring for:
PHP Api Version:         20170718
Zend Module Api No:      20170718
Zend Extension Api No:   320170718
enable sockets supports? [no] : yes
enable openssl support? [no] : yes
enable http2 support? [no] : no
enable mysqlnd support? [no] : no
...
... some long message about compiling
...
Build process completed successfully
Installing '/usr/local/Cellar/php@7.2/7.2.20/include/php/ext/swoole/config.h'
Installing '/usr/local/Cellar/php@7.2/7.2.20/pecl/20170718/swoole.so'
install ok: channel://pecl.php.net/swoole-4.4.2
Extension swoole enabled in php.ini

Share on Facebook Twitter