0

卸载 php-pgsql 时出现问题。它不能被删除。

[root@ip-172-31-31-52 /]# yum list php-pgsql\*
Loaded plugins: priorities, update-motd, upgrade-helper
Available Packages
php-pgsql.x86_64                   5.3.29-1.8.amzn1                    amzn-main

[root@ip-172-31-31-52 /]# yum remove php-pgsql\*
Loaded plugins: priorities, update-motd, upgrade-helper
No Match for argument: php-pgsql*
No Packages marked for removal

当我检查包可用但仍然无法删除时。请帮忙。谢谢

4

1 回答 1

0

如果查看 list 命令的输出,它会显示php-pgsql.x86_64可用,但未安装在机器上。这就是为什么当你点击 remove 命令时,它会显示no packages marked for removal.

为了支持我的回答,我曾尝试在 上运行您的两个命令ec2,如果已安装,它会删除包。

现在,如果插件安装在 ec2 上并运行listcommand ,它会显示已安装的包:

  [root@ip-xx-xxx-xx-xxx ec2-user]# yum list php-pgsql*
  Loaded plugins: priorities, update-motd, upgrade-helper
  Installed Packages -- this line shows it installed.
  php-pgsql.x86_64   

尝试删除命令来删除包:

[root@ip-xx-xxx-xx-xxx ec2-user]# yum remove php-pgsql* -y
Loaded plugins: priorities, update-motd, upgrade-helper
Resolving Dependencies
--> Running transaction check
---> Package php-pgsql.x86_64 0:5.3.29-1.8.amzn1 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================================================================================================
 Package                                                 Arch                                                 Version                                                         Repository                                                Size
=============================================================================================================================================================================================================================================
Removing:
 php-pgsql                                               x86_64                                               5.3.29-1.8.amzn1                                                @amzn-main                                               315 k

Transaction Summary
=============================================================================================================================================================================================================================================
Remove  1 Package

Installed size: 315 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Erasing    : php-pgsql-5.3.29-1.8.amzn1.x86_64                                                                                                                                                                                         1/1
  Verifying  : php-pgsql-5.3.29-1.8.amzn1.x86_64                                                                                                                                                                                         1/1

Removed:
  php-pgsql.x86_64 0:5.3.29-1.8.amzn1

Complete!
于 2019-02-27T05:43:02.530 回答