在过去的几天里,我从同一个实时 USB 重新安装了 Centos 7 两次。
第一次,我以以下(典型)方式安装了一堆我需要的包,sudo yum install XXX
其中XXX
包是ntfs-3g
、qemu
、 或geany
。这一次,我得到了No package XXX available.
正如我所说,我在同一台机器上使用了相同的实时 USB。我相当确定我运行了sudo yum update
两次(我肯定进行了此安装,因为我安装了多个内核版本)。
以下是一些可能有用的信息:
Centos版本
$ cat /etc/centos-release
CentOS Linux release 7.2.1511 (Core)
启用的存储库
$ yum repolist enabled
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.sonn.com
* extras: mirror.tocici.com
* updates: mirror.hmc.edu
repo id repo name status
base/7/x86_64 CentOS-7 - Base 9,007
extras/7/x86_64 CentOS-7 - Extras 264
updates/7/x86_64 CentOS-7 - Updates 1,213
repolist: 10,484
除了冗长之外,都是一样的
$ yum repolist enabled -v
Loading "fastestmirror" plugin
Loading "langpacks" plugin
Adding en_US to language list
Config time: 0.008
Yum version: 3.4.3
Loading mirror speeds from cached hostfile
* base: centos.sonn.com
* extras: mirror.tocici.com
* updates: mirror.hmc.edu
Setting up Package Sacks
pkgsack time: 0.004
Repo-id : base/7/x86_64
Repo-name : CentOS-7 - Base
Repo-revision: 1449700451
Repo-updated : Wed Dec 9 14:35:45 2015
Repo-pkgs : 9,007
Repo-size : 6.5 G
Repo-mirrors : http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock
Repo-baseurl : http://centos.sonn.com/7.2.1511/os/x86_64/ (9 more)
Repo-expire : 21,600 second(s) (last: Sun Apr 3 13:07:31 2016)
Repo-filename: /etc/yum.repos.d/CentOS-Base.repo
Repo-id : extras/7/x86_64
Repo-name : CentOS-7 - Extras
Repo-revision: 1459508613
Repo-updated : Fri Apr 1 04:03:51 2016
Repo-pkgs : 264
Repo-size : 704 M
Repo-mirrors : http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=extras&infra=stock
Repo-baseurl : http://mirror.tocici.com/centos/7.2.1511/extras/x86_64/ (9 more)
Repo-expire : 21,600 second(s) (last: Sun Apr 3 13:07:31 2016)
Repo-filename: /etc/yum.repos.d/CentOS-Base.repo
Repo-id : updates/7/x86_64
Repo-name : CentOS-7 - Updates
Repo-revision: 1459456033
Repo-updated : Thu Mar 31 13:30:30 2016
Repo-pkgs : 1,213
Repo-size : 3.3 G
Repo-mirrors : http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=updates&infra=stock
Repo-baseurl : http://mirror.hmc.edu/centos/7.2.1511/updates/x86_64/ (9 more)
Repo-expire : 21,600 second(s) (last: Sun Apr 3 13:07:31 2016)
Repo-filename: /etc/yum.repos.d/CentOS-Base.repo
repolist: 10,484
所有仓库
$ yum repolist all
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.sonn.com
* extras: mirror.tocici.com
* updates: mirror.hmc.edu
repo id repo name status
C7.0.1406-base/x86_64 CentOS-7.0.1406 - Base disabled
C7.0.1406-centosplus/x86_64 CentOS-7.0.1406 - CentOSPlus disabled
C7.0.1406-extras/x86_64 CentOS-7.0.1406 - Extras disabled
C7.0.1406-fasttrack/x86_64 CentOS-7.0.1406 - CentOSPlus disabled
C7.0.1406-updates/x86_64 CentOS-7.0.1406 - Updates disabled
C7.1.1503-base/x86_64 CentOS-7.1.1503 - Base disabled
C7.1.1503-centosplus/x86_64 CentOS-7.1.1503 - CentOSPlus disabled
C7.1.1503-extras/x86_64 CentOS-7.1.1503 - Extras disabled
C7.1.1503-fasttrack/x86_64 CentOS-7.1.1503 - CentOSPlus disabled
C7.1.1503-updates/x86_64 CentOS-7.1.1503 - Updates disabled
base/7/x86_64 CentOS-7 - Base enabled: 9,007
base-debuginfo/x86_64 CentOS-7 - Debuginfo disabled
base-source/7 CentOS-7 - Base Sources disabled
c7-media CentOS-7 - Media disabled
centosplus/7/x86_64 CentOS-7 - Plus disabled
centosplus-source/7 CentOS-7 - Plus Sources disabled
cr/7/x86_64 CentOS-7 - cr disabled
extras/7/x86_64 CentOS-7 - Extras enabled: 264
extras-source/7 CentOS-7 - Extras Sources disabled
fasttrack/7/x86_64 CentOS-7 - fasttrack disabled
updates/7/x86_64 CentOS-7 - Updates enabled: 1,213
updates-source/7 CentOS-7 - Updates Sources disabled
repolist: 10,484
寻找吉尼
yum search geany
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.sonn.com
* extras: mirror.tocici.com
* updates: mirror.hmc.edu
Warning: No matches found for: geany
No matches found
搜索 qemu
$ yum search qemu
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.sonn.com
* extras: mirror.tocici.com
* updates: mirror.hmc.edu
============================== N/S matched: qemu ===============================
centos-release-qemu-ev.noarch : QEMU Enterprise Virtualization packages from the
: CentOS Virtualization SIG repository
ipxe-roms-qemu.noarch : Network boot loader roms supported by QEMU, .rom format
libvirt-daemon-driver-qemu.x86_64 : Qemu driver plugin for the libvirtd daemon
qemu-guest-agent.x86_64 : QEMU guest agent
qemu-img.x86_64 : QEMU command line tool for manipulating disk images
qemu-kvm.x86_64 : QEMU is a FAST! processor emulator
qemu-kvm-common.x86_64 : QEMU common files needed by all QEMU targets
libvirt-lock-sanlock.x86_64 : Sanlock lock manager plugin for QEMU driver
qemu-kvm-tools.x86_64 : KVM debugging and diagnostics tools
Name and summary matches only, use "search all" for everything.
这个有一些热门,但我记得yum install qemu
可以工作并安装一大堆 qemu 软件包。
正在尝试安装qemu
$ sudo yum install qemu
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.sonn.com
* extras: mirror.tocici.com
* updates: centos.eecs.wsu.edu
No package qemu available.
Error: Nothing to do
具有讽刺意味的是,由于这一切,我无法解决密码管理器的依赖关系,因此我无法登录我的 SE 帐户。
解决这个问题就像添加/启用存储库一样简单吗?
答案1
qemu
EPEL中有一个包(企业 Linux 的额外软件包)。列出存储库时,CentOS 不会显示为“Extras”。
RPM 查找器对于查看它是否在 EPEL 中非常有用:
- RPM 资源 qemu(提到 EPEL)
- RPM 资源 qemu-system-x86(再次提到EPEL)