CentOSに疲れたので、気分転換にRHEL7を使ってみることにしました。 そうしたらRHELでも問題が起きました。その問題とはサブスクライブがうまく通らないという現象です。
実行したこと
- RHEL7.3をインストール
- サブスクライブ
ユーザー、パスワードは自分のアカウントのものを設定しました。
# subscription-manager register --username admin-example --password secret
- yum update
特にエラーが出なかったので、システムを最新化するため、yum updateを実施しました
結果
次のようなエラーになりました。
# yum update ... This system is registered to Red Hat Subscription Management, but is not receiving updates. You can use subscription-manager to assign subscriptions.There are no enabled repos
エラーで検索したら次のようなナレッジベースを発見しました。 時刻が狂っているとそういった問題が起きることがあるみたいです。でもdateコマンドで確認した時刻は特に狂っているような様子はありませんでした。
- yum update を実行すると This system is registered to Red Hat Subscription Management, but is not receiving updates. You can use subscription-manager to assign subscriptions エラーメッセージが発生する - Red Hat Customer Portal
- Error message while `yum update' "This system is registered to Red Hat Subscription Management, but is not receiving updates. You can use subscription-manager to assign subscriptions" - Red Hat Customer Portal
解決方法
いろいろな方法があるようですが、subscription-manager refresh
コマンドを実行した後、yum update
を実行したら、先ほどのようなエラーは起きなくなり、うまくいきました。いろいろ調べた上で解決しないようでしたらsubscription-manager refresh
コマンドをお試しください。