开始计划用mamp安装就行,去了mac装lnmp,又去了docket安装lnmp,又想去虚拟机装lnmp,最后回来了还是mamp安装吧
1.第一步
sudo /Applications/MAMP/bin/php/php7.2.8/bin/phpize
2.第二步
./configure --with-php-config=/Applications/MAMP/bin/php/php7.2.8/bin/php-config
3.第三步
make install
4.第四步
(cd .libs && rm -f swoole.la && ln -s ../swoole.la swoole.la)
/bin/sh /applications/mamp/swoole-src/libtool --mode=install cp ./swoole.la /applications/mamp/swoole-src/modules
cp ./.libs/swoole.so /applications/mamp/swoole-src/modules/swoole.so
cp ./.libs/swoole.lai /applications/mamp/swoole-src/modules/swoole.la
----------------------------------------------------------------------
Libraries have been installed in:
/applications/mamp/swoole-src/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable
during execution
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Installing shared extensions: /Applications/MAMP/bin/php/php7.2.8/lib/php/extensions/no-debug-non-zts-20170718/
Installing header files: /Applications/MAMP/bin/php/php7.2.8/include/php/
bogon:swoole-src Mac$
注意两个php.ini