1084. Broken Keyboard (20)-PAT甲级试题

On a broken keyboard, some of the keys are worn out. So when you type some sentences, the characters corresponding to those keys will not appear on screen.

Now given a string that you are supposed to type, and the string that you actually type out, please list those keys which are for sure worn out.

Input Specification:

Each input file contains one test case. For each case, the 1st line contains the original string, and the 2nd line contains the typed-out string. Each string contains no more than 80 characters which are either English letters [A-Z] (case insensitive), digital numbers [0-9], or “_” (representing the space). It is guaranteed that both strings are non-empty.

Output Specification:

[root@controller-06 ~]# yum install openstack-cinder -y 已加载插件:fastestmirror Loading mirror speeds from cached hostfile 正在解决依赖关系 --> 正在检查事务 ---> 软件包 openstack-cinder.noarch.1.15.6.0-1.el7 将被 安装 --> 正在处理依赖关系 python2-cinder = 1:15.6.0-1.el7,它被软件包 1:openstack-cinder-15.6.0-1.el7.noarch 需要 --> 正在处理依赖关系 python-rtslib,它被软件包 1:openstack-cinder-15.6.0-1.el7.noarch 需要 --> 正在检查事务 ---> 软件包 openstack-cinder.noarch.1.15.6.0-1.el7 将被 安装 --> 正在处理依赖关系 python-rtslib,它被软件包 1:openstack-cinder-15.6.0-1.el7.noarch 需要 ---> 软件包 python2-cinder.noarch.1.15.6.0-1.el7 将被 安装 --> 正在处理依赖关系 python2-google-api-client >= 1.4.2,它被软件包 1:python2-cinder-15.6.0-1.el7.noarch 需要 --> 正在处理依赖关系 python2-oauth2client >= 1.5.0,它被软件包 1:python2-cinder-15.6.0-1.el7.noarch 需要 --> 正在处理依赖关系 qemu-img >= 2.10.0,它被软件包 1:python2-cinder-15.6.0-1.el7.noarch 需要 --> 正在处理依赖关系 python2-etcd3gw,它被软件包 1:python2-cinder-15.6.0-1.el7.noarch 需要 --> 正在检查事务 ---> 软件包 openstack-cinder.noarch.1.15.6.0-1.el7 将被 安装 --> 正在处理依赖关系 python-rtslib,它被软件包 1:openstack-cinder-15.6.0-1.el7.noarch 需要 ---> 软件包 python2-cinder.noarch.1.15.6.0-1.el7 将被 安装 --> 正在处理依赖关系 qemu-img >= 2.10.0,它被软件包 1:python2-cinder-15.6.0-1.el7.noarch 需要 ---> 软件包 python2-etcd3gw.noarch.0.0.2.5-1.el7 将被 安装 ---> 软件包 python2-google-api-client.noarch.0.1.4.2-4.el7 将被 安装 --> 正在处理依赖关系 python-uri-templates >= 0.6,它被软件包 python2-google-api-client-1.4.2-4.el7.noarch 需要 ---> 软件包 python2-oauth2client.noarch.0.1.5.2-3.el7.1 将被 安装 --> 正在处理依赖关系 python-gflags,它被软件包 python2-oauth2client-1.5.2-3.el7.1.noarch 需要 --> 正在检查事务 ---> 软件包 openstack-cinder.noarch.1.15.6.0-1.el7 将被 安装 --> 正在处理依赖关系 python-rtslib,它被软件包 1:openstack-cinder-15.6.0-1.el7.noarch 需要 ---> 软件包 python2-cinder.noarch.1.15.6.0-1.el7 将被 安装 --> 正在处理依赖关系 qemu-img >= 2.10.0,它被软件包 1:python2-cinder-15.6.0-1.el7.noarch 需要 ---> 软件包 python2-gflags.noarch.0.2.0-5.el7 将被 安装 ---> 软件包 python2-uri-templates.noarch.0.0.6-5.el7 将被 安装 --> 解决依赖关系完成 错误:软件包:1:python2-cinder-15.6.0-1.el7.noarch (openstack) 需要:qemu-img >= 2.10.0 错误:软件包:1:openstack-cinder-15.6.0-1.el7.noarch (openstack) 需要:python-rtslib 您可以尝试添加 --skip-broken 选项来解决该问题 您可以尝试执行:rpm -Va --nofiles --nodigest
最新发布
06-10
### 解决 OpenStack Cinder 安装时的依赖问题 在 CentOS 7 环境下安装 `openstack-cinder` 时,遇到依赖问题通常与 `qemu-img` 和 `python-rtslib` 的版本或可用性相关。以下是针对这些具体问题的详细解决方案。 #### 针对 `qemu-img >= 2.10.0` 的缺失问题 `qemu-img` 是 QEMU 工具的一部分,用于处理虚拟机磁盘镜像。如果系统中缺少满足版本要求的 `qemu-img`,可以通过启用额外的仓库来解决。例如,CentOS 提供了一个专门的 KVM 公共仓库,其中包含较新版本的 QEMU 工具[^3]。 创建一个新的仓库配置文件 `/etc/yum.repos.d/CentOS-QEMU-EV.repo`,内容如下: ```ini [CentOS-QEMU-EV] name=CentOS-7 - QEMU EV baseurl=https://mirrors.aliyun.com/centos/7/virt/x86_64/kvm-common/ gpgcheck=0 enabled=1 ``` 保存后,运行以下命令以安装满足版本要求的 `qemu-img`: ```bash yum clean all yum makecache yum install -y qemu-img ``` #### 针对 `python-rtslib` 的缺失问题 `python-rtslib` 是一个用于管理 iSCSI 目标的 Python 库,OpenStack Cinder 在某些存储后端配置中需要它。如果系统中缺少该软件包,可能是因为默认仓库中未提供。可以通过启用 EPEL 仓库或其他第三方仓库来解决[^1]。 首先,确保已启用 EPEL 仓库: ```bash yum install -y epel-release ``` 然后尝试安装 `python-rtslib` 及其相关组件: ```bash yum install -y python-rtslib targetcli ``` 如果仍然无法找到 `python-rtslib`,可以考虑从源代码编译安装。下载最新版本的源代码并按照官方文档进行编译和安装[^2]。 #### 检查依赖关系 在安装 `openstack-cinder` 之前,可以使用 `yum deplist` 命令检查所有依赖项是否已正确解析。例如: ```bash yum deplist openstack-cinder ``` 如果发现仍有未满足的依赖项,可以逐一尝试安装这些依赖项。例如,对于 `python2-google-api-client` 或 `python2-oauth2client`,可以直接运行以下命令: ```bash yum install -y python2-google-api-client python2-oauth2client ``` #### 手动安装 OpenStack Cinder 在解决了所有依赖问题后,重新尝试安装 `openstack-cinder`: ```bash yum install -y openstack-cinder ``` 如果仍遇到问题,可以尝试添加 `--skip-broken` 选项跳过无法解析的依赖项,但这可能会导致功能不完整: ```bash yum install -y openstack-cinder --skip-broken ``` #### 示例脚本:自动解析依赖项 以下是一个简单的 Bash 脚本,用于自动解析并安装 `openstack-cinder` 的所有依赖项: ```bash #!/bin/bash PACKAGE="openstack-cinder" DEPENDENCIES=$(repoquery --requires --resolve $PACKAGE | awk '{print $1}') for dep in $DEPENDENCIES; do yum install -y $dep done yum install -y $PACKAGE ``` 将上述脚本保存为文件(如 `install_cinder.sh`),赋予可执行权限并运行: ```bash chmod +x install_cinder.sh ./install_cinder.sh ``` ### 注意事项 - 如果使用的是自定义构建的 RPM 包,可能会导致依赖解析失败。建议优先使用官方提供的稳定版本。 - 在某些情况下,可能需要手动下载并安装特定版本的 RPM 包。可以访问 [RPM Find](https://rpmfind.net/) 或类似的资源网站获取所需的软件包。
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值