我想用 rpm -qa --last 来删除几个软件包来检查,我担心做错了会导致系统崩溃。
问题:
我已经在一个系统中安装了两次安装的 pcsc 工具,如何将 pcsc-tools 设置为1.5.2 在删除它们之前?
有没有办法显示里面的列表rpm -qa --last > 列表?
命令检查pcsc版本:
pcscd-fd
当前运行的pcsc:
- 00000000pcscdaemon.c:280:main() pcscd 设置为前台,调试发送到 stderr
- 00000029debuglog.c:239:DebugLogSetLevel() 调试级别=调试
- 00000619pcscdaemon.c:498:main() pcsc-lite 1.4.102 守护进程就绪。
- 00000497hotplug_libhal.c:450:HPRegisterForHotplugEvents() pcsc 驱动程序目录中没有捆绑文件:/usr/lib64/readers
- 00000008hotplug_libhal.c:451:HPRegisterForHotplugEvents() 禁用 pcscd 的 USB 支持
- 00000006 pcscdaemon.c:517:main() SVCServiceRunLoop 返回
00000005 pcscdaemon.c:523:at_exit() 清理 /var/run/pcscd
命令和结果更新:
zypper se -s pcsc
S | Name | Type | Version | Arch | Repository --+-----------------+---------+-----------------+--------+------------------ i | pcsc-lite | package | 1.4.102-1.37.3 | x86_64 | (System Packages) i | pcsc-lite-32bit | package | 1.4.102-1.37.3 | x86_64 | (System Packages) i | pcsc-tools | package | 1.5.2-lp150.1.3 | x86_64 | (System Packages)
猫 /etc/os-release
NAME="Vet"
VERSION="11.4"
VERSION_ID="11.4"
PRETTY_NAME="SUSE Linux Enterprise Server 11 SP4"
ID="vet"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:11:4"
zypper LR-d
# | Alias | Name | Enabled | Refresh | Priority | Type | URI | Service
--+------------------------------------------------------------------------+----------------------------------------------------------------------+---------+---------+----------+-------+-------------------------------------------------------------------------+--------
1 | SUSE-Linux-Enterprise-High-Availability-Extension-11-SP4_11.4.4-1.54 | SUSE-Linux-Enterprise-High-Availability-Extension-11-SP4 11.4.4-1.54 | Yes | No | 99 | yast2 | iso:///?iso=SLE-HA-11-SP4-x86_64-GM-CD1.iso&url=file:///home/source/ |
2 | SUSE-Linux-Enterprise-High-Availability-Extension-11-SP4_11.4.4-1.54_1 | SUSE-Linux-Enterprise-High-Availability-Extension-11-SP4 11.4.4-1.54 | Yes | No | 99 | yast2 | iso:///?iso=SLE-HA-11-SP4-x86_64-GM-CD2.iso&url=file:///home/source/ |
3 | SUSE-Linux-Enterprise-Server-11-SP4_11.4.4-1.109 | SUSE-Linux-Enterprise-Server-11-SP4 11.4.4-1.109 | Yes | No | 99 | yast2 | iso:///?iso=SLES-11-SP4-DVD-x86_64-GM-DVD1.iso&url=file:///home/source/ |
齐普勒
# | Alias | Name | Enabled | Refresh
--+------------------------------------------------------------------------+----------------------------------------------------------------------+---------+--------
1 | SUSE-Linux-Enterprise-High-Availability-Extension-11-SP4_11.4.4-1.54 | SUSE-Linux-Enterprise-High-Availability-Extension-11-SP4 11.4.4-1.54 | Yes | No
2 | SUSE-Linux-Enterprise-High-Availability-Extension-11-SP4_11.4.4-1.54_1 | SUSE-Linux-Enterprise-High-Availability-Extension-11-SP4 11.4.4-1.54 | Yes | No
3 | SUSE-Linux-Enterprise-Server-11-SP4_11.4.4-1.109 | SUSE-Linux-Enterprise-Server-11-SP4 11.4.4-1.109 | Yes | No
4 | pcsc-repo | pcsc-repo | Yes | No
zypper se -s pcsc-lite
S | Name | Type | Version | Arch | Repository
--+-----------------+---------+----------------+--------+------------------
i | pcsc-lite | package | 1.4.102-1.37.3 | x86_64 | (System Packages)
i | pcsc-lite-32bit | package | 1.4.102-1.37.3 | x86_64 | (System Packages)
zypper 参考
Retrieving repository 'SUSE-Linux-Enterprise-High-Availability-Extension-11-SP4 11.4.4-1.54' metadata [error]
Repository 'SUSE-Linux-Enterprise-High-Availability-Extension-11-SP4 11.4.4-1.54' is invalid.
[|] Valid metadata not found at specified URL(s)
Please check if the URIs defined for this repository are pointing to a valid repository.
Skipping repository 'SUSE-Linux-Enterprise-High-Availability-Extension-11-SP4 11.4.4-1.54' because of the above error.
Retrieving repository 'SUSE-Linux-Enterprise-High-Availability-Extension-11-SP4 11.4.4-1.54' metadata [|]
Specified path '/home/source/' is not a directory: file:/home/source/
以下是要删除的包:
- pcsc-lite 1.4.102
- pcsc-工具-1.5.2-lp150.1.3
答案1
可以通过执行“sudo yum 历史列表”并识别事务编号来撤消安装事务。可以通过“sudo yum History undo transaction_number”来撤消。
如果还有其他软件包与 pcsc* 软件包一起安装,这可能不是正确的做法,因为它也会删除它们。
最好的办法是使用“rpm -e --nodeps pcsc-lite 1.4.102 pcsc-tools-1.5.2-lp150.1.3”删除软件包,以删除软件包而不删除其他应用程序所需的任何依赖项。
如果您有可能拍摄快照,最好拍一张以防万一。
答案2
通过运行以下命令将以下存储库添加到系统中:
# add repo
zypper addrepo https://download.opensuse.org/repositories/security:/chipcard/SLE_11_SP4/ pcsc-repo
# refresh repos
zypper ref
zypper se -s pcsc-lite
如果存储库包含所有依赖项(它不是官方存储库),您应该会看到更新的版本。通过运行安装它zypper in pcsc-lite=1.5.4
。您可能必须至少在存储库刷新期间暂时信任该存储库才能使用它,请自行承担风险,我不知道您有关外部存储库等的安全策略。