这是我运行命令时的输出
❯ sudo apt remove php
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package 'php' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 387 not upgraded.
❯ php -v
PHP 8.2.15 (cli) (built: Jan 20 2024 14:17:05) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.15, Copyright (c) Zend Technologies
with Zend OPcache v8.2.15, Copyright (c), by Zend Technologies
我的硬件规格
Chassis: laptop
Operating System: Linux Mint 21.2
Kernel: Linux 5.15.0-76-generic
Architecture: x86-64
Hardware Vendor: Dell Inc.
Hardware Model: Latitude 7280
当我查看 /usr/bin 目录中的 php 时
❯ ls /usr/bin | grep php
php
php8.1
php.default
抱歉我无法给出截图,因为我需要 10 声望。 谢谢你的回答
尝试使用
sudo apt remove php8.1
然后
sudo apt autoremove
和
sudo apt autoclean