运行swoole程序时出现此错误,说明操作系统gcc版本过低,请升级gcc至4.4以上版本。

  1. /usr/local/php56/bin/php: symbol lookup error: /usr/local/php56/lib/php/extensions/no-debug-non-zts-20131226/swoole.so: undefined symbol: __sync_bool_compare_and_swap_4

然后重新编译安装swoole

  1. phpize
  2. ./configure
  3. make clean
  4. make install