この記事は約172分12秒で読むことができます。

peeコマンドをinstallしたかった話

参考文献

丁寧だよなー。

今さらですがyum(^^;)

ローカルマシンに登録しているレポジトリを確認

コード表示

[root@61eff46d2318 mnt]# yum repolist
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: ty1.mirror.newmediaexpress.com
 * extras: ty1.mirror.newmediaexpress.com
 * updates: ty1.mirror.newmediaexpress.com
repo id                                                                                              repo name                                                                                               status
base/7/x86_64                                                                                        CentOS-7 - Base                                                                                         10019
extras/7/x86_64                                                                                      CentOS-7 - Extras                                                                                         387
updates/7/x86_64                                                                                     CentOS-7 - Updates                                                                                       1840
repolist: 12246

コマンドがどのレポジトリのパッケージに含まれているか確認

コード表示

[root@61eff46d2318 mnt]# yum provides cp
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: ty1.mirror.newmediaexpress.com
 * extras: ty1.mirror.newmediaexpress.com
 * updates: ty1.mirror.newmediaexpress.com
coreutils-8.22-23.el7.x86_64 : A set of basic GNU tools commonly used in shell scripts
Repo        : base
Matched from:
Filename    : /bin/cp



coreutils-8.22-23.el7.x86_64 : A set of basic GNU tools commonly used in shell scripts
Repo        : base
Matched from:
Filename    : /usr/bin/cp



coreutils-8.22-23.el7.x86_64 : A set of basic GNU tools commonly used in shell scripts
Repo        : @CentOS
Matched from:
Filename    : /bin/cp



coreutils-8.22-23.el7.x86_64 : A set of basic GNU tools commonly used in shell scripts
Repo        : @CentOS
Matched from:
Filename    : /usr/bin/cp

コマンドの所在を確認

コード表示

[root@61eff46d2318 mnt]# which cp
alias cp='cp -i'
	/usr/bin/cp
[root@61eff46d2318 mnt]# rpm -qf $(which cp)
rpm: -i': unknown option
[root@61eff46d2318 mnt]# rpm -qf $(which cp | tail -n 1)
coreutils-8.22-23.el7.x86_64

peeコマンドは登録しているレポジトリにない

コード表示

[root@61eff46d2318 mnt]# yum provides pee
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: ty1.mirror.newmediaexpress.com
 * extras: ty1.mirror.newmediaexpress.com
 * updates: ty1.mirror.newmediaexpress.com
base/7/x86_64/filelists_db                                                                                                                                                                  | 7.1 MB  00:00:03     
extras/7/x86_64/filelists_db                                                                                                                                                                | 236 kB  00:00:00     
updates/7/x86_64/filelists_db                                                                                                                                                               | 3.4 MB  00:00:01     
No matches found

peeコマンドは登録しているレポジトリにないので、該当するパッケージもあるわけなく。。

コード表示

[root@61eff46d2318 mnt]# rpm -qf $(which pee)
/usr/bin/which: no pee in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
rpm: no arguments given for query

peeコマンドを含むパッケージが管理されているレポジトリを探す旅に出る。

でた

ローカルに登録されているレポジトリを確認

コード表示

[root@61eff46d2318 mnt]# cd /etc/yum.repos.d
[root@61eff46d2318 yum.repos.d]# ll
total 32
-rw-r--r--. 1 root root 1664 Nov 23 22:16 CentOS-Base.repo
-rw-r--r--. 1 root root 1309 Nov 23 22:16 CentOS-CR.repo
-rw-r--r--. 1 root root  649 Nov 23 22:16 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root  630 Nov 23 22:16 CentOS-Media.repo
-rw-r--r--. 1 root root 1331 Nov 23 22:16 CentOS-Sources.repo
-rw-r--r--. 1 root root 5701 Nov 23 22:16 CentOS-Vault.repo
-rw-r--r--. 1 root root  314 Nov 23 22:16 CentOS-fasttrack.repo
らいい

enablerepo=*のオプションで全レポジトリに大して当該のコマンドの提供元をぎゃくびきする。

CentOS-Media.repoのせいでfailする

コード表示

[root@61eff46d2318 yum.repos.d]# yum --enablerepo=* provides pee
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: ty1.mirror.newmediaexpress.com
 * c7-media: 
 * centosplus: ty1.mirror.newmediaexpress.com
 * extras: ty1.mirror.newmediaexpress.com
 * fasttrack: ty1.mirror.newmediaexpress.com
 * updates: ty1.mirror.newmediaexpress.com
C7.0.1406-base                                                                                                                                                                              | 3.6 kB  00:00:00     
C7.0.1406-centosplus                                                                                                                                                                        | 2.9 kB  00:00:00     
C7.0.1406-extras                                                                                                                                                                            | 2.9 kB  00:00:00     
C7.0.1406-fasttrack                                                                                                                                                                         | 2.9 kB  00:00:00     
C7.0.1406-updates                                                                                                                                                                           | 2.9 kB  00:00:00     
C7.1.1503-base                                                                                                                                                                              | 3.6 kB  00:00:00     
C7.1.1503-centosplus                                                                                                                                                                        | 3.4 kB  00:00:00     
C7.1.1503-extras                                                                                                                                                                            | 3.4 kB  00:00:00     
C7.1.1503-fasttrack                                                                                                                                                                         | 3.4 kB  00:00:00     
C7.1.1503-updates                                                                                                                                                                           | 3.4 kB  00:00:00     
C7.2.1511-base                                                                                                                                                                              | 3.6 kB  00:00:00     
C7.2.1511-centosplus                                                                                                                                                                        | 3.4 kB  00:00:00     
C7.2.1511-extras                                                                                                                                                                            | 3.4 kB  00:00:00     
C7.2.1511-fasttrack                                                                                                                                                                         | 3.3 kB  00:00:00     
C7.2.1511-updates                                                                                                                                                                           | 3.4 kB  00:00:00     
C7.3.1611-base                                                                                                                                                                              | 3.6 kB  00:00:00     
C7.3.1611-centosplus                                                                                                                                                                        | 3.4 kB  00:00:00     
C7.3.1611-extras                                                                                                                                                                            | 3.4 kB  00:00:00     
C7.3.1611-fasttrack                                                                                                                                                                         | 3.3 kB  00:00:00     
C7.3.1611-updates                                                                                                                                                                           | 3.4 kB  00:00:00     
C7.4.1708-base                                                                                                                                                                              | 3.6 kB  00:00:00     
C7.4.1708-centosplus                                                                                                                                                                        | 3.4 kB  00:00:00     
C7.4.1708-extras                                                                                                                                                                            | 3.4 kB  00:00:00     
C7.4.1708-fasttrack                                                                                                                                                                         | 3.3 kB  00:00:00     
C7.4.1708-updates                                                                                                                                                                           | 3.4 kB  00:00:00     
C7.5.1804-base                                                                                                                                                                              | 3.6 kB  00:00:00     
C7.5.1804-centosplus                                                                                                                                                                        | 3.4 kB  00:00:00     
C7.5.1804-extras                                                                                                                                                                            | 3.4 kB  00:00:00     
C7.5.1804-fasttrack                                                                                                                                                                         | 3.3 kB  00:00:00     
C7.5.1804-updates                                                                                                                                                                           | 3.4 kB  00:00:00     
base-debuginfo                                                                                                                                                                              | 2.5 kB  00:00:00     
base-source                                                                                                                                                                                 | 2.9 kB  00:00:00     
file:///media/CentOS/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /media/CentOS/repodata/repomd.xml"
Trying other mirror.
file:///media/cdrecorder/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /media/cdrecorder/repodata/repomd.xml"
Trying other mirror.
file:///media/cdrom/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /media/cdrom/repodata/repomd.xml"
Trying other mirror.


 One of the configured repositories failed (CentOS-7 - Media),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:

     1. Contact the upstream for the repository and get them to fix the problem.

     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).

     3. Run the command with the repository temporarily disabled
            yum --disablerepo=c7-media ...

     4. Disable the repository permanently, so yum won't use it by default. Yum
        will then just ignore the repository until you permanently enable it
        again or use --enablerepo for temporary usage:

            yum-config-manager --disable c7-media
        or
            subscription-manager repos --disable=c7-media

     5. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:

            yum-config-manager --save --setopt=c7-media.skip_if_unavailable=true

failure: repodata/repomd.xml from c7-media: [Errno 256] No more mirrors to try.
file:///media/CentOS/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /media/CentOS/repodata/repomd.xml"
file:///media/cdrecorder/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /media/cdrecorder/repodata/repomd.xml"
file:///media/cdrom/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /media/cdrom/repodata/repomd.xml"

CentOS-Media.repoを削除する

コード表示

[root@61eff46d2318 yum.repos.d]# pwd
/etc/yum.repos.d
[root@61eff46d2318 yum.repos.d]# ll
total 32
-rw-r--r--. 1 root root 1664 Nov 23 22:16 CentOS-Base.repo
-rw-r--r--. 1 root root 1309 Nov 23 22:16 CentOS-CR.repo
-rw-r--r--. 1 root root  649 Nov 23 22:16 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root  630 Nov 23 22:16 CentOS-Media.repo
-rw-r--r--. 1 root root 1331 Nov 23 22:16 CentOS-Sources.repo
-rw-r--r--. 1 root root 5701 Nov 23 22:16 CentOS-Vault.repo
-rw-r--r--. 1 root root  314 Nov 23 22:16 CentOS-fasttrack.repo
[root@61eff46d2318 yum.repos.d]# rm CentOS-Media.repo
rm: remove regular file 'CentOS-Media.repo'? y
[root@61eff46d2318 yum.repos.d]# ll
total 28
-rw-r--r--. 1 root root 1664 Nov 23 22:16 CentOS-Base.repo
-rw-r--r--. 1 root root 1309 Nov 23 22:16 CentOS-CR.repo
-rw-r--r--. 1 root root  649 Nov 23 22:16 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root 1331 Nov 23 22:16 CentOS-Sources.repo
-rw-r--r--. 1 root root 5701 Nov 23 22:16 CentOS-Vault.repo
-rw-r--r--. 1 root root  314 Nov 23 22:16 CentOS-fasttrack.repo

enablerepo=*のオプションで全レポジトリに大して当該のコマンドの提供元をぎゃくびきする。

コード表示

[root@61eff46d2318 yum.repos.d]# yum --enablerepo=* provides pee
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: ty1.mirror.newmediaexpress.com
 * centosplus: ty1.mirror.newmediaexpress.com
 * extras: ty1.mirror.newmediaexpress.com
 * fasttrack: ty1.mirror.newmediaexpress.com
 * updates: ty1.mirror.newmediaexpress.com
C7.0.1406-base                                                                                                                                                                              | 3.6 kB  00:00:00     
C7.0.1406-centosplus                                                                                                                                                                        | 2.9 kB  00:00:00     
C7.0.1406-extras                                                                                                                                                                            | 2.9 kB  00:00:00     
C7.0.1406-fasttrack                                                                                                                                                                         | 2.9 kB  00:00:00     
C7.0.1406-updates                                                                                                                                                                           | 2.9 kB  00:00:00     
C7.1.1503-base                                                                                                                                                                              | 3.6 kB  00:00:00     
C7.1.1503-centosplus                                                                                                                                                                        | 3.4 kB  00:00:00     
C7.1.1503-extras                                                                                                                                                                            | 3.4 kB  00:00:00     
C7.1.1503-fasttrack                                                                                                                                                                         | 3.4 kB  00:00:00     
C7.1.1503-updates                                                                                                                                                                           | 3.4 kB  00:00:00     
C7.2.1511-base                                                                                                                                                                              | 3.6 kB  00:00:00     
C7.2.1511-centosplus                                                                                                                                                                        | 3.4 kB  00:00:00     
C7.2.1511-extras                                                                                                                                                                            | 3.4 kB  00:00:00     
C7.2.1511-fasttrack                                                                                                                                                                         | 3.3 kB  00:00:00     
C7.2.1511-updates                                                                                                                                                                           | 3.4 kB  00:00:00     
C7.3.1611-base                                                                                                                                                                              | 3.6 kB  00:00:00     
C7.3.1611-centosplus                                                                                                                                                                        | 3.4 kB  00:00:00     
C7.3.1611-extras                                                                                                                                                                            | 3.4 kB  00:00:00     
C7.3.1611-fasttrack                                                                                                                                                                         | 3.3 kB  00:00:00     
C7.3.1611-updates                                                                                                                                                                           | 3.4 kB  00:00:00     
C7.4.1708-base                                                                                                                                                                              | 3.6 kB  00:00:00     
C7.4.1708-centosplus                                                                                                                                                                        | 3.4 kB  00:00:00     
C7.4.1708-extras                                                                                                                                                                            | 3.4 kB  00:00:00     
C7.4.1708-fasttrack                                                                                                                                                                         | 3.3 kB  00:00:00     
C7.4.1708-updates                                                                                                                                                                           | 3.4 kB  00:00:00     
C7.5.1804-base                                                                                                                                                                              | 3.6 kB  00:00:00     
C7.5.1804-centosplus                                                                                                                                                                        | 3.4 kB  00:00:00     
C7.5.1804-extras                                                                                                                                                                            | 3.4 kB  00:00:00     
C7.5.1804-fasttrack                                                                                                                                                                         | 3.3 kB  00:00:00     
C7.5.1804-updates                                                                                                                                                                           | 3.4 kB  00:00:00     
base                                                                                                                                                                                        | 3.6 kB  00:00:00     
base-debuginfo                                                                                                                                                                              | 2.5 kB  00:00:00     
base-source                                                                                                                                                                                 | 2.9 kB  00:00:00     
centosplus                                                                                                                                                                                  | 3.4 kB  00:00:00     
centosplus-source                                                                                                                                                                           | 2.9 kB  00:00:00     
cr                                                                                                                                                                                          | 3.3 kB  00:00:00     
extras                                                                                                                                                                                      | 3.4 kB  00:00:00     
extras-source                                                                                                                                                                               | 2.9 kB  00:00:00     
fasttrack                                                                                                                                                                                   | 3.4 kB  00:00:00     
updates                                                                                                                                                                                     | 3.4 kB  00:00:00     
updates-source                                                                                                                                                                              | 2.9 kB  00:00:00     
(1/44): C7.0.1406-extras/x86_64/primary_db                                                                                                                                                  |  43 kB  00:00:00     
(2/44): C7.0.1406-fasttrack/x86_64/primary_db                                                                                                                                               | 124 kB  00:00:00     
(3/44): C7.0.1406-base/x86_64/group_gz                                                                                                                                                      | 157 kB  00:00:00     
(4/44): C7.1.1503-base/x86_64/group_gz                                                                                                                                                      | 154 kB  00:00:00     
(5/44): C7.0.1406-centosplus/x86_64/primary_db                                                                                                                                              | 3.5 MB  00:00:03     
(6/44): C7.1.1503-extras/x86_64/primary_db                                                                                                                                                  | 120 kB  00:00:00     
(7/44): C7.1.1503-fasttrack/x86_64/primary_db                                                                                                                                               |  71 kB  00:00:00     
(8/44): C7.1.1503-centosplus/x86_64/primary_db                                                                                                                                              | 2.2 MB  00:00:03     
(9/44): C7.0.1406-base/x86_64/primary_db                                                                                                                                                    | 4.9 MB  00:00:04     
(10/44): C7.2.1511-base/x86_64/group_gz                                                                                                                                                     | 155 kB  00:00:00     
(11/44): C7.1.1503-base/x86_64/primary_db                                                                                                                                                   | 5.1 MB  00:00:12     
(12/44): C7.2.1511-extras/x86_64/primary_db                                                                                                                                                 | 166 kB  00:00:01     
(13/44): C7.2.1511-fasttrack/x86_64/primary_db                                                                                                                                              | 1.2 kB  00:00:00     
(14/44): C7.2.1511-centosplus/x86_64/primary_db                                                                                                                                             | 4.1 MB  00:00:19     
(15/44): C7.3.1611-base/x86_64/group_gz                                                                                                                                                     | 155 kB  00:00:00     
(16/44): C7.1.1503-updates/x86_64/primary_db                                                                                                                                                | 4.7 MB  00:00:23     
(17/44): C7.2.1511-base/x86_64/primary_db                                                                                                                                                   | 5.3 MB  00:00:22     
(18/44): C7.3.1611-extras/x86_64/primary_db                                                                                                                                                 | 191 kB  00:00:01     
(19/44): C7.3.1611-fasttrack/x86_64/primary_db                                                                                                                                              | 1.2 kB  00:00:00     
(20/44): C7.0.1406-updates/x86_64/primary_db                                                                                                                                                | 7.2 MB  00:00:29     
(21/44): C7.4.1708-base/x86_64/group_gz                                                                                                                                                     | 156 kB  00:00:00     
(22/44): C7.3.1611-centosplus/x86_64/primary_db                                                                                                                                             | 3.2 MB  00:00:11     
(23/44): C7.2.1511-updates/x86_64/primary_db                                                                                                                                                | 9.1 MB  00:00:26     
(24/44): C7.4.1708-extras/x86_64/primary_db                                                                                                                                                 | 185 kB  00:00:00     
(25/44): C7.4.1708-fasttrack/x86_64/primary_db                                                                                                                                              | 1.2 kB  00:00:00     
(26/44): C7.3.1611-base/x86_64/primary_db                                                                                                                                                   | 5.6 MB  00:00:18     
(27/44): C7.5.1804-base/x86_64/group_gz                                                                                                                                                     | 166 kB  00:00:00     
(28/44): C7.4.1708-base/x86_64/primary_db                                                                                                                                                   | 5.7 MB  00:00:23     
(29/44): C7.4.1708-centosplus/x86_64/primary_db                                                                                                                                             | 3.1 MB  00:00:17     
(30/44): C7.3.1611-updates/x86_64/primary_db                                                                                                                                                | 7.8 MB  00:00:27     
(31/44): C7.5.1804-fasttrack/x86_64/primary_db                                                                                                                                              | 1.1 kB  00:00:00     
(32/44): C7.5.1804-extras/x86_64/primary_db                                                                                                                                                 | 205 kB  00:00:00     
(33/44): base-debuginfo/x86_64/primary_db                                                                                                                                                   | 2.5 MB  00:00:03     
(34/44): base-source/7/primary_db                                                                                                                                                           | 966 kB  00:00:03     
(35/44): C7.5.1804-centosplus/x86_64/primary_db                                                                                                                                             | 3.3 MB  00:00:10     
(36/44): centosplus-source/7/primary_db                                                                                                                                                     | 5.9 kB  00:00:00     
(37/44): centosplus/7/x86_64/primary_db                                                                                                                                                     | 2.0 MB  00:00:00     
(38/44): extras-source/7/primary_db                                                                                                                                                         |  25 kB  00:00:00     
(39/44): fasttrack/7/x86_64/primary_db                                                                                                                                                      |  76 kB  00:00:00     
(40/44): cr/7/x86_64/primary_db                                                                                                                                                             | 1.1 kB  00:00:00     
(41/44): updates-source/7/primary_db                                                                                                                                                        | 113 kB  00:00:00     
(42/44): C7.5.1804-updates/x86_64/primary_db                                                                                                                                                | 6.0 MB  00:00:14     
(43/44): C7.5.1804-base/x86_64/primary_db                                                                                                                                                   | 5.9 MB  00:00:32     
(44/44): C7.4.1708-updates/x86_64/primary_db                                                                                                                                                | 6.9 MB  00:00:39     
C7.0.1406-base/x86_64/filelists_db                                                                                                                                                          | 5.8 MB  00:00:37     
C7.0.1406-centosplus/x86_64/filelists_db                                                                                                                                                    | 2.2 MB  00:00:17     
C7.0.1406-extras/x86_64/filelists_db                                                                                                                                                        | 121 kB  00:00:00     
C7.0.1406-fasttrack/x86_64/filelists_db                                                                                                                                                     |  93 kB  00:00:00     
C7.0.1406-updates/x86_64/filelists_db                                                                                                                                                       | 5.3 MB  00:00:19     
C7.1.1503-base/x86_64/filelists_db                                                                                                                                                          | 6.0 MB  00:00:20     
C7.1.1503-centosplus/x86_64/filelists_db                                                                                                                                                    | 1.1 MB  00:00:06     
C7.1.1503-extras/x86_64/filelists_db                                                                                                                                                        | 392 kB  00:00:02     
C7.1.1503-fasttrack/x86_64/filelists_db                                                                                                                                                     |  76 kB  00:00:00     
C7.1.1503-updates/x86_64/filelists_db                                                                                                                                                       | 3.0 MB  00:00:15     
C7.2.1511-base/x86_64/filelists_db                                                                                                                                                          | 6.2 MB  00:00:34     
C7.2.1511-centosplus/x86_64/filelists_db                                                                                                                                                    | 2.0 MB  00:00:10     
C7.2.1511-extras/x86_64/filelists_db                                                                                                                                                        | 468 kB  00:00:02     
C7.2.1511-fasttrack/x86_64/filelists_db                                                                                                                                                     |  586 B  00:00:00     
C7.2.1511-updates/x86_64/filelists_db                                                                                                                                                       | 5.3 MB  00:00:23     
C7.3.1611-base/x86_64/filelists_db                                                                                                                                                          | 6.6 MB  00:00:30     
C7.3.1611-centosplus/x86_64/filelists_db                                                                                                                                                    | 1.5 MB  00:00:06     
C7.3.1611-extras/x86_64/filelists_db                                                                                                                                                        | 1.1 MB  00:00:06     
C7.3.1611-fasttrack/x86_64/filelists_db                                                                                                                                                     |  586 B  00:00:00     
C7.3.1611-updates/x86_64/filelists_db                                                                                                                                                       | 4.4 MB  00:00:27     
C7.4.1708-base/x86_64/filelists_db                                                                                                                                                          | 6.7 MB  00:00:36     
C7.4.1708-centosplus/x86_64/filelists_db                                                                                                                                                    | 1.4 MB  00:00:06     
C7.4.1708-extras/x86_64/filelists_db                                                                                                                                                        | 709 kB  00:00:02     
C7.4.1708-fasttrack/x86_64/filelists_db                                                                                                                                                     |  586 B  00:00:00     
C7.4.1708-updates/x86_64/filelists_db                                                                                                                                                       | 4.2 MB  00:00:26     
C7.5.1804-base/x86_64/filelists_db                                                                                                                                                          | 6.9 MB  00:01:02     
C7.5.1804-centosplus/x86_64/filelists_db                                                                                                                                                    | 1.5 MB  00:00:11     
C7.5.1804-extras/x86_64/filelists_db                                                                                                                                                        | 603 kB  00:00:02     
C7.5.1804-fasttrack/x86_64/filelists_db                                                                                                                                                     |  586 B  00:00:00     
C7.5.1804-updates/x86_64/filelists_db                                                                                                                                                       | 3.4 MB  00:00:18     
base-debuginfo/x86_64/filelists_db                                                                                                                                                          |  66 MB  00:05:35     
centosplus/7/x86_64/filelists_db                                                                                                                                                            | 926 kB  00:00:00     
cr/7/x86_64/filelists_db                                                                                                                                                                    |  586 B  00:00:00     
fasttrack/7/x86_64/filelists_db                                                                                                                                                             |  39 kB  00:00:00     
No matches found

見つからなかったので、epelレポ登録する。結局。

調査力がすごい。すごすぎ。どんな検索の仕方したんだろ。

EPELリポジトリの簡単な追加方法
コード表示

[root@61eff46d2318 yum.repos.d]# yum --disablerepo=* --enablerepo=extra* --showduplicates list epel*
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * extras: ty1.mirror.newmediaexpress.com
Available Packages
epel-release.noarch                                                                                           7-11                                                                                           extras

epelいんすこ

コード表示

[root@61eff46d2318 yum.repos.d]# ll
total 28
-rw-r--r--. 1 root root 1664 Nov 23 22:16 CentOS-Base.repo
-rw-r--r--. 1 root root 1309 Nov 23 22:16 CentOS-CR.repo
-rw-r--r--. 1 root root  649 Nov 23 22:16 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root 1331 Nov 23 22:16 CentOS-Sources.repo
-rw-r--r--. 1 root root 5701 Nov 23 22:16 CentOS-Vault.repo
-rw-r--r--. 1 root root  314 Nov 23 22:16 CentOS-fasttrack.repo
[root@61eff46d2318 yum.repos.d]# yum install -y epel-release
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: ty1.mirror.newmediaexpress.com
 * extras: ty1.mirror.newmediaexpress.com
 * updates: ty1.mirror.newmediaexpress.com
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-11 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================================================================================
 Package                                                 Arch                                              Version                                         Repository                                         Size
===================================================================================================================================================================================================================
Installing:
 epel-release                                            noarch                                            7-11                                            extras                                             15 k

Transaction Summary
===================================================================================================================================================================================================================
Install  1 Package

Total download size: 15 k
Installed size: 24 k
Downloading packages:
epel-release-7-11.noarch.rpm                                                                                                                                                                |  15 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : epel-release-7-11.noarch                                                                                                                                                                        1/1 
  Verifying  : epel-release-7-11.noarch                                                                                                                                                                        1/1 

Installed:
  epel-release.noarch 0:7-11                                                                                                                                                                                       

Complete!
[root@61eff46d2318 yum.repos.d]# ll
total 36
-rw-r--r--. 1 root root 1664 Nov 23 22:16 CentOS-Base.repo
-rw-r--r--. 1 root root 1309 Nov 23 22:16 CentOS-CR.repo
-rw-r--r--. 1 root root  649 Nov 23 22:16 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root 1331 Nov 23 22:16 CentOS-Sources.repo
-rw-r--r--. 1 root root 5701 Nov 23 22:16 CentOS-Vault.repo
-rw-r--r--. 1 root root  314 Nov 23 22:16 CentOS-fasttrack.repo
-rw-r--r--. 1 root root 1050 Oct  3  2017 epel-testing.repo
-rw-r--r--. 1 root root  951 Oct  3  2017 epel.repo
[root@61eff46d2318 yum.repos.d]# yum repolist
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: ty1.mirror.newmediaexpress.com
 * epel: ftp.riken.jp
 * extras: ty1.mirror.newmediaexpress.com
 * updates: ty1.mirror.newmediaexpress.com
repo id                                                                                repo name                                                                                                             status
base/7/x86_64                                                                          CentOS-7 - Base                                                                                                       10019
epel/x86_64                                                                            Extra Packages for Enterprise Linux 7 - x86_64                                                                        13125
extras/7/x86_64                                                                        CentOS-7 - Extras                                                                                                       387
updates/7/x86_64                                                                       CentOS-7 - Updates                                                                                                     1840
repolist: 25371

peeは何処

コード表示

[root@61eff46d2318 yum.repos.d]# yum provides pee
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: ty1.mirror.newmediaexpress.com
 * epel: ftp.riken.jp
 * extras: ty1.mirror.newmediaexpress.com
 * updates: ty1.mirror.newmediaexpress.com
moreutils-0.49-2.el7.x86_64 : Additional unix utilities
Repo        : epel
Matched from:
Filename    : /usr/bin/pee

[root@61eff46d2318 yum.repos.d]# which pee
/usr/bin/which: no pee in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
[root@61eff46d2318 yum.repos.d]# rpm -qf $(which pee)
/usr/bin/which: no pee in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
rpm: no arguments given for query



moreutils-0.49-2.el7.x86_64いんすこ

コード表示

[root@61eff46d2318 yum.repos.d]# yum install -y moreutils-0.49-2.el7.x86_64
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: ty1.mirror.newmediaexpress.com
 * epel: ftp.riken.jp
 * extras: ty1.mirror.newmediaexpress.com
 * updates: ty1.mirror.newmediaexpress.com
Resolving Dependencies
--> Running transaction check
---> Package moreutils.x86_64 0:0.49-2.el7 will be installed
--> Processing Dependency: perl(IPC::Run) for package: moreutils-0.49-2.el7.x86_64
--> Processing Dependency: perl-Time-Duration for package: moreutils-0.49-2.el7.x86_64
--> Processing Dependency: perl-TimeDate for package: moreutils-0.49-2.el7.x86_64
--> Running transaction check
---> Package perl-IPC-Run.noarch 0:0.92-2.el7 will be installed
--> Processing Dependency: perl(IO::Pty) >= 1.08 for package: perl-IPC-Run-0.92-2.el7.noarch
---> Package perl-Time-Duration.noarch 0:1.06-17.el7 will be installed
---> Package perl-TimeDate.noarch 1:2.30-2.el7 will be installed
--> Running transaction check
---> Package perl-IO-Tty.x86_64 0:1.10-11.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================================================================================
 Package                                                    Arch                                           Version                                              Repository                                    Size
===================================================================================================================================================================================================================
Installing:
 moreutils                                                  x86_64                                         0.49-2.el7                                           epel                                          76 k
Installing for dependencies:
 perl-IO-Tty                                                x86_64                                         1.10-11.el7                                          base                                          42 k
 perl-IPC-Run                                               noarch                                         0.92-2.el7                                           base                                         122 k
 perl-Time-Duration                                         noarch                                         1.06-17.el7                                          epel                                          17 k
 perl-TimeDate                                              noarch                                         1:2.30-2.el7                                         base                                          52 k

Transaction Summary
===================================================================================================================================================================================================================
Install  1 Package (+4 Dependent packages)

Total download size: 308 k
Installed size: 674 k
Downloading packages:
(1/5): perl-IO-Tty-1.10-11.el7.x86_64.rpm                                                                                                                                                   |  42 kB  00:00:00     
warning: /var/cache/yum/x86_64/7/epel/packages/moreutils-0.49-2.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Public key for moreutils-0.49-2.el7.x86_64.rpm is not installed
(2/5): moreutils-0.49-2.el7.x86_64.rpm                                                                                                                                                      |  76 kB  00:00:00     
(3/5): perl-IPC-Run-0.92-2.el7.noarch.rpm                                                                                                                                                   | 122 kB  00:00:00     
(4/5): perl-Time-Duration-1.06-17.el7.noarch.rpm                                                                                                                                            |  17 kB  00:00:00     
(5/5): perl-TimeDate-2.30-2.el7.noarch.rpm                                                                                                                                                  |  52 kB  00:00:00     
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                              505 kB/s | 308 kB  00:00:00     
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Importing GPG key 0x352C64E5:
 Userid     : "Fedora EPEL (7) "
 Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5
 Package    : epel-release-7-11.noarch (@extras)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 1:perl-TimeDate-2.30-2.el7.noarch                                                                                                                                                               1/5 
  Installing : perl-Time-Duration-1.06-17.el7.noarch                                                                                                                                                           2/5 
  Installing : perl-IO-Tty-1.10-11.el7.x86_64                                                                                                                                                                  3/5 
  Installing : perl-IPC-Run-0.92-2.el7.noarch                                                                                                                                                                  4/5 
  Installing : moreutils-0.49-2.el7.x86_64                                                                                                                                                                     5/5 
  Verifying  : perl-IPC-Run-0.92-2.el7.noarch                                                                                                                                                                  1/5 
  Verifying  : moreutils-0.49-2.el7.x86_64                                                                                                                                                                     2/5 
  Verifying  : perl-IO-Tty-1.10-11.el7.x86_64                                                                                                                                                                  3/5 
  Verifying  : perl-Time-Duration-1.06-17.el7.noarch                                                                                                                                                           4/5 
  Verifying  : 1:perl-TimeDate-2.30-2.el7.noarch                                                                                                                                                               5/5 

Installed:
  moreutils.x86_64 0:0.49-2.el7                                                                                                                                                                                    

Dependency Installed:
  perl-IO-Tty.x86_64 0:1.10-11.el7                  perl-IPC-Run.noarch 0:0.92-2.el7                  perl-Time-Duration.noarch 0:1.06-17.el7                  perl-TimeDate.noarch 1:2.30-2.el7                 

Complete!

peeみつけた

コード表示

[root@61eff46d2318 yum.repos.d]# which pee
/usr/bin/pee
[root@61eff46d2318 yum.repos.d]# rpm -qf $(which pee)
moreutils-0.49-2.el7.x86_64

man peeはみれない

dockerhostのほうはみれるからな。ここらへんはおいおいりかいしていけたらいいかな

コード表示


[root@61eff46d2318 yum.repos.d]# rpm -qf $(which man)
man-db-2.6.3-11.el7.x86_64
[root@61eff46d2318 yum.repos.d]# man bash
[root@61eff46d2318 yum.repos.d]# 
[root@61eff46d2318 yum.repos.d]# man pee
No manual entry for pee
[root@61eff46d2318 yum.repos.d]# rpm -qf $(which pee)
moreutils-0.49-2.el7.x86_64
[root@61eff46d2318 yum.repos.d]# yum reinstall -y moreutils-0.49-2.el7.x86_64
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: ty1.mirror.newmediaexpress.com
 * epel: ftp.riken.jp
 * extras: ty1.mirror.newmediaexpress.com
 * updates: ty1.mirror.newmediaexpress.com
Resolving Dependencies
--> Running transaction check
---> Package moreutils.x86_64 0:0.49-2.el7 will be reinstalled
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================================================================================
 Package                                             Arch                                             Version                                                 Repository                                      Size
===================================================================================================================================================================================================================
Reinstalling:
 moreutils                                           x86_64                                           0.49-2.el7                                              epel                                            76 k

Transaction Summary
===================================================================================================================================================================================================================
Reinstall  1 Package

Total download size: 76 k
Installed size: 152 k
Downloading packages:
moreutils-0.49-2.el7.x86_64.rpm                                                                                                                                                             |  76 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : moreutils-0.49-2.el7.x86_64                                                                                                                                                                     1/1 
  Verifying  : moreutils-0.49-2.el7.x86_64                                                                                                                                                                     1/1 

Installed:
  moreutils.x86_64 0:0.49-2.el7                                                                                                                                                                                    

Complete!
[root@61eff46d2318 yum.repos.d]# man pee
No manual entry for pee
[root@61eff46d2318 yum.repos.d]# yum reinstall -y man-pages
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: ty1.mirror.newmediaexpress.com
 * epel: ftp.riken.jp
 * extras: ty1.mirror.newmediaexpress.com
 * updates: ty1.mirror.newmediaexpress.com
Resolving Dependencies
--> Running transaction check
---> Package man-pages.noarch 0:3.53-5.el7 will be reinstalled
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================================================================================
 Package                                             Arch                                             Version                                                 Repository                                      Size
===================================================================================================================================================================================================================
Reinstalling:
 man-pages                                           noarch                                           3.53-5.el7                                              base                                           5.0 M

Transaction Summary
===================================================================================================================================================================================================================
Reinstall  1 Package

Total download size: 5.0 M
Installed size: 4.6 M
Downloading packages:
man-pages-3.53-5.el7.noarch.rpm                                                                                                                                                             | 5.0 MB  00:00:02     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : man-pages-3.53-5.el7.noarch                                                                                                                                                                     1/1 
  Verifying  : man-pages-3.53-5.el7.noarch                                                                                                                                                                     1/1 

Installed:
  man-pages.noarch 0:3.53-5.el7                                                                                                                                                                                    

Complete!
[root@61eff46d2318 yum.repos.d]# man pee
No manual entry for pee

man peeはみれない

いれたレポからとればいいんじゃね。とかおもったけどみれなかった。dockerホストと同じパッケージみてるんだけどな。

コード表示

[root@61eff46d2318 yum.repos.d]# yum install -y man-pages-de.noarch
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: ty1.mirror.newmediaexpress.com
 * epel: ftp.riken.jp
 * extras: ty1.mirror.newmediaexpress.com
 * updates: ty1.mirror.newmediaexpress.com
Resolving Dependencies
--> Running transaction check
---> Package man-pages-de.noarch 0:1.8-4.g7c4902d.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================================================================================
 Package                                              Arch                                           Version                                                    Repository                                    Size
===================================================================================================================================================================================================================
Installing:
 man-pages-de                                         noarch                                         1.8-4.g7c4902d.el7                                         epel                                         1.5 M

Transaction Summary
===================================================================================================================================================================================================================
Install  1 Package

Total download size: 1.5 M
Installed size: 1.4 M
Downloading packages:
man-pages-de-1.8-4.g7c4902d.el7.noarch.rpm                                                                                                                                                  | 1.5 MB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : man-pages-de-1.8-4.g7c4902d.el7.noarch                                                                                                                                                          1/1 
  Verifying  : man-pages-de-1.8-4.g7c4902d.el7.noarch                                                                                                                                                          1/1 

Installed:
  man-pages-de.noarch 0:1.8-4.g7c4902d.el7                                                                                                                                                                         

Complete!
[root@61eff46d2318 yum.repos.d]# man pee
No manual entry for pee
[root@61eff46d2318 yum.repos.d]# yum clean all
Loaded plugins: fastestmirror, ovl
Cleaning repos: base epel extras updates
Cleaning up list of fastest mirrors
Other repos take up 1.7 G of disk space (use --verbose for details)
[root@61eff46d2318 yum.repos.d]# yum update
Loaded plugins: fastestmirror, ovl
Determining fastest mirrors
epel/x86_64/metalink                                                                                                                                                                        | 6.8 kB  00:00:00     
 * base: ftp.iij.ad.jp
 * epel: ftp.iij.ad.jp
 * extras: ftp.iij.ad.jp
 * updates: ftp.iij.ad.jp
base                                                                                                                                                                                        | 3.6 kB  00:00:00     
epel                                                                                                                                                                                        | 4.7 kB  00:00:00     
extras                                                                                                                                                                                      | 3.4 kB  00:00:00     
updates                                                                                                                                                                                     | 3.4 kB  00:00:00     
(1/7): epel/x86_64/group_gz                                                                                                                                                                 |  88 kB  00:00:00     
(2/7): base/7/x86_64/group_gz                                                                                                                                                               | 166 kB  00:00:00     
(3/7): epel/x86_64/updateinfo                                                                                                                                                               | 995 kB  00:00:00     
(4/7): extras/7/x86_64/primary_db                                                                                                                                                           | 188 kB  00:00:00     
(5/7): base/7/x86_64/primary_db                                                                                                                                                             | 6.0 MB  00:00:02     
(6/7): epel/x86_64/primary_db                                                                                                                                                               | 6.7 MB  00:00:02     
(7/7): updates/7/x86_64/primary_db                                                                                                                                                          | 4.2 MB  00:00:02     
No packages marked for update
[root@61eff46d2318 yum.repos.d]# man pee
No manual entry for pee
[root@61eff46d2318 yum.repos.d]# yum reinstall -y man-pages.noarch
[root@61eff46d2318 yum.repos.d]# yum reinstall -y moreutils-0.49-2.el7.x86_64
[root@61eff46d2318 yum.repos.d]# man pee
No manual entry for pee

あとがき

とりあえずepelレポいれておこう。peeでこんなに時間とってしまったぜ。

コード表示

[root@61eff46d2318 yum.repos.d]# echo ainekurainenahatomujiku | pee 'cat -' 'rev'
ainekurainenahatomujiku
ukijumotahaneniarukenia
[root@61eff46d2318 yum.repos.d]# echo ainekurainenahatomujiku | pee 'cat -' 'rev' | pee 'cat -' 'rev'
ainekurainenahatomujiku
ukijumotahaneniarukenia
ukijumotahaneniarukenia
ainekurainenahatomujiku

Leave a Reply

Your email address will not be published. Required fields are marked *