HTTPエラー(401 - 承認されていません):サービスは利用できません。後でもう一度お試しください。 [閉じる]

HTTPエラー(401 - 承認されていません):サービスは利用できません。後でもう一度お試しください。 [閉じる]

CentOS-8(バージョン番号:8.2.2004)をインストールしたときにyumパッケージマネージャを使用しようとすると(パッケージのインストールまたは検索など)、次のメッセージが表示されます。「このシステムはRed Hatに登録されていません。購読マネージャを使って登録できます。」

その後、サブスクリプションマネージャを使用してシステムを登録しようとすると、次の出力が表示されます。

[user@centos ~]$ sudo subscription-manager register --username myUserName --password a-password 
Registering to: subscription.rhsm.redhat.com:443/subscription
HTTP error (401 - Unauthorized): Service not available, please try again later

なぜこれが起こるのか知っていますか?


迅速な返信ありがとうございます。私は答えを適用しましたが、まだyumを使用してパッケージをインストールすることはできません。

これは私のディレクトリのlsです/etc/yum.repos.d/

[user@centos yum.repos.d]$ ls
CentOS-AppStream.repo   CentOS-Extras.repo      dgoodwin-subscription-manager-    epel-8.repo  fedora-rpmfusion.repo
centosbase.repo         CentOS-fasttrack.repo   epel-modular.repo                          fedora-russian.repo
CentOS-Base.repo        CentOS-HA.repo          epel-playground.repo                       getpagespeed-extras.repo
CentOS-centosplus.repo  CentOS-Media.repo       epel.repo                                  rpmfusion-free-updates.repo
CentOS-CR.repo          CentOS-PowerTools.repo  epel-testing-modular.repo                  rpmfusion-free-updates-testing.repo
CentOS-Debuginfo.repo   CentOS-Sources.repo     epel-testing.repo
CentOS-Devel.repo       CentOS-Vault.repo       fedora.repo

これはyum installを使用した後の端末出力です。

[user@centos yum.repos.d]$ sudo yum install filezilla
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Repository extras is listed more than once in the configuration
Last metadata expiration check: 0:04:09 ago on Tue 17 Nov 2020 08:43:19 PM EET.
=======================================================================
Some packages in your transaction are brought to you by GetPageSpeed: 
 - libuv-1:1.40.0-1.el8.x86_64
 - pugixml-1.10-1.el8.x86_64
To enable package installs, subscribe using the following link:

https://www.getpagespeed.com/repo-subscribe?server_ip=141.237.47.180
=======================================================================

私は何が間違っていましたか?私は完全に迷子になった。

ベストアンサー1

購読できませんセントースサーバー上右ニューラルネットワーク。 RHELディストリビューションが必要です。完了したら、次のものが必要です。

  1. Red Hatカスタマーポータルに登録してください。
  2. 購読を購入してRedHatログインIDにマップします。
  3. 購読を有効にしてください。
  4. サブスクリプションをサーバーに接続します。subscription-manager register

最後のコメント以降:

システムに登録されていないメッセージについて心配しないでください。これは単なるメッセージです。

ご覧のとおり、ミラーを使用して必要なパッケージをダウンロードできるようにcentosリポジトリを有効にする必要があり、yumを介してのみ構成できます。

以下centosbase.repoのファイルを作成し、/etc/yum.repos.d/上記の内容を入力します。

[base]
name=CentOS $releasever – Base
baseurl=http://mirror.centos.org/centos/7/os/$basearch/
gpgcheck=0
enabled=1

[updates]
name=CentOS $releasever – Updates
baseurl=http://mirror.centos.org/centos/7/updates/$basearch/
gpgcheck=0
enabled=1

[extras]
name=CentOS $releasever – Extras
baseurl=http://mirror.centos.org/centos/7/extras/$basearch/
gpgcheck=0
enabled=1

Yumキャッシュを消去する:

rm -rf /var/cache/yum/*
yum clean all

その後、パッケージをインストールします。

yum install <package_name>

途中で警告メッセージが表示されてシステムが停止した場合は、yum install購読マネージャをクリーンアップしてください。

subscription-manager clean all

おすすめ記事