You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
虽然还是报这个错误: PHP Fatal error: Uncaught TypeError: Return value of “phpx\Command\Build::
execute()” must be type of the int, “null” returned.在 phar:///usr/local/bin/phpx/vendor/symfony/console/Command/Command.php:301
堆栈跟踪中:
#0 phar:///usr/local/bin/phpx/vendor/symfony/console/Application.php(1040):Symfony\Component\Console\Command\Command->run() swoole/phpx#1 phar:///usr/local/bin/phpx/vendor/symfony/console/Application.php(301):Symfony\Component\Console\Application->doRunCommand()
PHP Fatal error: Uncaught ErrorException: Creation of dynamic property Swoole_ZooKeeper::$handle is deprecated in /www/wwwroot/hyperf-skeleton/vendor/hyperf/config-zookeeper/src/Client.php:25
好的,这是我具体的操作步骤,您这边可以试着安装以下看看是否是这样的错误: 安装swoole/ext-zookeeper我先安装了phpx
首先我先安装最新的cmake:
https://cmake.org/files/v3.9/cmake-3.9.0.tar.gz
相继输入以下命令: tar xzvf cmake-3.9.0.tar.gz cd cmake-3.3.2 ./bootstrap gmake make install
这样安装好了cmake,接下来安装phpx 相继输入以下命令:
git clone https://github.com/matyhtf/phpx.git
cd phpx ./build.sh
cp bin/phpx
/usr/local/bin
cmake .
make -j 4
make install
以上都步骤安装都是没有问题的,偏偏就到了安装swoole/ext-zookeeper时: 第一次我用的是php8.2的版本: git clone https://github.com/swoole/ext-zookeeper.git
cd ext-zookeeper
phpx build -v -d
就到了phpx build 这里的时候就报错了:这里不知道是不是因为版本原因导致的,但是就一直在这个位置报错:
PHP 致命错误:未捕获的 TypeError:“phpx\Command\Build::execute()”的返回值必须为 int 类型,“null”返回。在 phar:///usr/local/bin/phpx/vendor/symfony/console/Command/Command.php:301
堆栈跟踪中:
#0 phar:///usr/local/bin/phpx/vendor/symfony/console/Application.php(1040):Symfony\Component\Console\Command\Command->run() swoole/phpx#1 phar:///usr/local/bin/phpx/vendor/symfony/console/Application.php(301):Symfony\Component\Console\Application->doRunCommand()
https://github.com/swoole/phpx/pull/2phar:///usr/local/bin/phpx/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun() swoole/phpx#3 phar:///usr/local/bin/phpx/console.php(17): Symfony\Component\Console\Application->run() swoole/phpx#4 /usr/local/bin/phpx(10): include('...')
swoole/phpx#5 {main}
抛入phar:///usr/local/bin/phpx/vendor/symfony/console/Command/Command.php 301路
当我无视这个错误时,继续输入命令:
phpx install
虽然还是报这个错误: PHP Fatal error: Uncaught TypeError: Return value of “phpx\Command\Build::
execute()” must be type of the int, “null” returned.在 phar:///usr/local/bin/phpx/vendor/symfony/console/Command/Command.php:301
堆栈跟踪中:
#0 phar:///usr/local/bin/phpx/vendor/symfony/console/Application.php(1040):Symfony\Component\Console\Command\Command->run() swoole/phpx#1 phar:///usr/local/bin/phpx/vendor/symfony/console/Application.php(301):Symfony\Component\Console\Application->doRunCommand()
https://github.com/swoole/phpx/pull/2phar:///usr/local/bin/phpx/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun() swoole/phpx#3 phar:///usr/local/bin/phpx/console.php(17): Symfony\Component\Console\Application->run() swoole/phpx#4 /usr/local/bin/phpx(10): include('...')
swoole/phpx#5 {main}
扔进来phar:///usr/local/bin/phpx/vendor/symfony/console/Command/Command.php 301路
但是在: /www/server/php/81/lib/php/extensions/no-debug-non-zts-20210902 这个扩展目录下面能够生成:swoole_zookeeper.so这个文件, 我就把这个扩展文件加入到php配置文件中配置好,当我是php8.2的版本的时候: php-m 命令显示出能够加载swoole_zookeeper这个扩展,当我以为成功后,
我在项目使用zookeeper结果报了
这个错误:
PHP Fatal error: Uncaught ErrorException: Creation of dynamic property Swoole_ZooKeeper::$handle is deprecated in /www/wwwroot/hyperf-skeleton/vendor/hyperf/config-zookeeper/src/Client.php:25
这个好像是php8.2不支持动态属性添加导致的
最后我换成php8.1的版本,结果安装swoole/ext-zookeeper时;
PHP 致命错误:未捕获的 TypeError:“phpx\Command\Build::execute()”的返回值必须是 int 类型,“null”返回。在 phar:///usr/local/bin/phpx/vendor/symfony/console/Command/Command.php:301
堆栈跟踪中:
#0 phar:///usr/local/bin/phpx/vendor/symfony/console/Application.php(1040):Symfony\Component\Console\Command\Command->run() swoole/phpx#1 phar:///usr/local/bin/phpx/vendor/symfony/console/Application.php(301):Symfony\Component\Console\Application->doRunCommand()
https://github.com/swoole/phpx/pull/2phar:///usr/local/bin/phpx/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun() swoole/phpx#3 phar:///usr/local/bin/phpx/console.php(17): Symfony\Component\Console\Application->run() swoole/phpx#4 /usr/local/bin/phpx(10): include('...')
swoole/phpx#5 {main}
扔进去phar:///usr/local/bin/phpx/vendor/symfony/console/Command/Command.php on line 301 还是报这个错误,我又继续执行:
phpx install 虽然在php8.1的扩展目录下面
还是生成了swoole_zookeeper.so这个扩展文件,但是我又按照上面的步骤,将swoole_zookeeper.so文件添加到php配置文件中,
但是这次就一直加载不出来这个扩展了
输入phpx 命令一直报加载不了swoole_zookeeper这个扩展
The text was updated successfully, but these errors were encountered: