yum grouplistがパッケージグループを見つけることができず、インストールされているグループファイルがありませんというプロンプトが表示されます
Yum Grouplist Can T Find Package Group
問題の背景:
イントラネットYUMサーバーをセットアップすると、クライアントはHTTPサービスを介して独自に構築されたYUMサーバーにアクセスし、yum grouplistを実行しますが、パッケージグループが見つからず、「インストールされているグループファイルがありません」というプロンプトが表示されます。
問題の説明:
[root@xxxxx]# yum grouplist Loaded plugins: fastestmirror There is no installed groups file. Maybe run: yum groups mark convert (see man yum) Loading mirror speeds from cached hostfile
問題を特定します。
yumサーバー側にグループの定義ファイル(* comps.xml)がありません
解決:
yumサーバー側はcreaterepoを使用してグループの定義ファイルを生成する必要があります
Yumサーバー側の操作:
1. Find the Groups file location, go to the yum related directory to create a goup file, **Note:${Groups_File}For the found file** #find / -name *comps.xml*
検索結果、comps.xml is in the repodata folder in the mirror, and /mnt is the mount point of my mirror
:
/mnt/repodata/d87379a47bc2060f833000b9cef7f9670195fe197271d37fce5791e669265e8b-c7-x86_64-comps.xml
二。 createrepoは、グループの定義ファイルを生成します *(関連するcomps.xmlファイルをYUMソースディレクトリのrepodataフォルダに直接コピーすることは機能しているようです。次回試してください)*
createrepo -g /mnt/repodata/d87379a47bc2060f833000b9cef7f9670195fe197271d37fce5791e669265e8b-c7-x86_64-comps.xml /var/www/html/centos
注意:
-
最初:
/mnt/repodata/d87379a47bc2060f833000b9cef7f9670195fe197271d37fce5791e669265e8b-c7-x86_64-comps.xml
これは私の* comps.xmlファイルです。これは私の実際の状況に応じて入力されます。 -
2番目:
/var/www/html/centos
私のYUMソースパッケージディレクトリです -
3番目:作成されている場合、更新する必要がある場合はコマンドを使用します
createrepo -g ${GROUPS_FILE} --update .
Yumクライアントの操作:
yum clean all yum makecache
テストに成功しました!
関連リンク:
https://blog.csdn.net/qq43748322/article/details/103630858
https://blog.51cto.com/mengix/1663015