LoginSignup
1
0

More than 1 year has passed since last update.

CentOSでwgetがインストール出来なかった時の話

Last updated at Posted at 2022-06-01

今回はコマンドをインストールしたいのにインストールできなかった時の対処法を備忘録として残しておきます。

やりたいこと

CentOSにwgetがインストールされていなかったので、インストールしたいと思っています

経緯

インストールしようとしたところ、以下のようにエラーが発生

# yum install wget
YumRepo Error: All mirror URLs are not using ftp, http[s] or file

対処方法

以下のようにsedコマンドを用いてミラーリングリストからリポジトリを持ってきてからインストールすると上手くいきました。

# sed -i -e "s/^mirrorlist=http:\/\/mirrorlist.centos.org/#mirrorlist=http:\/\/mirrorlist.centos.org/g" /etc/yum.repos.d/CentOS-Base.repo
# sed -i -e "s/^#baseurl=http:\/\/mirror.centos.org/baseurl=http:\/\/vault.centos.org/g" /etc/yum.repos.d/CentOS-Base.repo

少しでもお役に立てれば幸いです。

参考資料

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0