2
thinkphp 6.0.8下think-swoole安装成功,但是无法正常运行无法运行,请教如何解决?
[root@localhost think-6.0.6]# composer require topthink/think-swoole
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? yes
Using version ^3.1 for topthink/think-swoole
./composer.json has been updated
Running composer update topthink/think-swoole
Loading composer repositories with package information
Updating dependencies
Lock file operations: 6 installs, 0 updates, 0 removals
- Locking nette/php-generator (v3.5.3)
- Locking nette/utils (v3.2.2)
- Locking open-smf/connection-pool (v1.0.16)
- Locking swoole/ide-helper (4.6.6)
- Locking symfony/finder (v5.2.4)
- Locking topthink/think-swoole (v3.1.2)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 6 installs, 0 updates, 0 removals
- Installing nette/utils (v3.2.2): Extracting archive
- Installing symfony/finder (v5.2.4): Extracting archive
- Installing swoole/ide-helper (4.6.6): Extracting archive
- Installing open-smf/connection-pool (v1.0.16): Extracting archive
- Installing nette/php-generator (v3.5.3): Extracting archive
- Installing topthink/think-swoole (v3.1.2): Extracting archive
3 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating autoload files
> @php think service:discover
Succeed!
> @php think vendor:publish
File /root/swoole/think-6.0.6/config/trace.php exist!
Succeed!
8 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
[root@localhost think-6.0.6]# php think
version 6.0.8
Usage:
command [options] [arguments]
Options:
-h, --help Display this help message
-V, --version Display this console version
-q, --quiet Do not output any message
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
clear Clear runtime file
help Displays help for a command
list Lists commands
run PHP Built-in Server for ThinkPHP
swoole Swoole HTTP Server for ThinkPHP
version show thinkphp framework version
make
make:command Create a new command class
make:controller Create a new resource controller class
make:event Create a new event class
make:listener Create a new listener class
make:middleware Create a new middleware class
make:model Create a new model class
make:service Create a new Service class
make:subscribe Create a new subscribe class
make:validate Create a validate class
optimize
optimize:route Build app route cache.
optimize:schema Build database schema cache.
route
route:list show route list.
rpc
rpc:interface Generate Rpc Service Interfaces
service
service:discover Discover Services for ThinkPHP
swoole
swoole:rpc Swoole RPC Server for ThinkPHP
vendor
vendor:publish Publish any publishable assets from vendor packages
[root@localhost think-6.0.6]# php think swoole start
Starting swoole http server...
Swoole http server started: <http://127.0.0.1:80>
You can exit with `CTRL-C`
PHP Fatal error: Declaration of think\swoole\App::runningInConsole() must be compatible with think\App::runningInConsole(): bool in /root/swoole/think-6.0.6/vendor/topthink/think-swoole/src/App.php on line 18
PHP Fatal error: Declaration of think\swoole\App::runningInConsole() must be compatible with think\App::runningInConsole(): bool in /root/swoole/think-6.0.6/vendor/topthink/think-swoole/src/App.php on line 18
[think\exception\ErrorException]
Declaration of think\swoole\App::runningInConsole() must be compatible with think\App::runningInConsole(): bool
[think\exception\ErrorException]
Declaration of think\swoole\App::runningInConsole() must be compatible with think\App::runningInConsole(): bool
PHP Fatal error: Declaration of think\swoole\App::runningInConsole() must be compatible with think\App::runningInConsole(): bool in /root/swoole/think-6.0.6/vendor/topthink/think-swoole/src/App.php on line 18
PHP Fatal error: Declaration of think\swoole\App::runningInConsole() must be compatible with think\App::runningInConsole(): bool in /root/swoole/think-6.0.6/vendor/topthink/think-swoole/src/App.php on line 18
[think\exception\ErrorException]
Declaration of think\swoole\App::runningInConsole() must be compatible with think\App::runningInConsole(): bool
[think\exception\ErrorException]
Declaration of think\swoole\App::runningInConsole() must be compatible with think\App::runningInConsole(): bool
PHP Fatal error: Declaration of think\swoole\App::runningInConsole() must be compatible with think\App::runningInConsole(): bool in /root/swoole/think-6.0.6/vendor/topthink/think-swoole/src/App.php on line 18
PHP Fatal error: Declaration of think\swoole\App::runningInConsole() must be compatible with think\App::runningInConsole(): bool in /root/swoole/think-6.0.6/vendor/topthink/think-swoole/src/App.php on line 18
[think\exception\ErrorException]
Declaration of think\swoole\App::runningInConsole() must be compatible with think\App::runningInConsole(): bool