質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
CentOS

CentOSは、主にRed Hat Enterprise Linux(RHEL)をベースにした、フリーのソフトウェアオペレーティングシステムです。

terminal

Terminalは、Apple社のmacOSに標準で付属しているUNIX端末エミュレータ。UNIXコマンドによってMacの操作および設定を行うことができます。

Docker

Dockerは、Docker社が開発したオープンソースのコンテナー管理ソフトウェアの1つです

Q&A

解決済

2回答

2408閲覧

DockerのCentOS7でwgetがインストールできない

situsitumonkun

総合スコア2

CentOS

CentOSは、主にRed Hat Enterprise Linux(RHEL)をベースにした、フリーのソフトウェアオペレーティングシステムです。

terminal

Terminalは、Apple社のmacOSに標準で付属しているUNIX端末エミュレータ。UNIXコマンドによってMacの操作および設定を行うことができます。

Docker

Dockerは、Docker社が開発したオープンソースのコンテナー管理ソフトウェアの1つです

0グッド

0クリップ

投稿2022/09/07 07:10

実現したいこと

m1 macを使用しています。
DockerのCentOS7で下記リポジトリをインストールするためwgetをインストールしたいです。

wget https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm

下記URLが原因かと思われますが、今時分が使用しているコンテナのdocker-compose.ymlがどの場所に保存されているのかがわからずハマっております。ヒントいただけると嬉しいです。
https://zenn.dev/hashi8084/articles/136458dd71a866

試したこと

DockerでCentOS7のコンテナを起動し、下記を実行。

docker exec -it <コンテナ名> /bin/bash
yum install wget

発生したエラー

# yum install wget Loaded plugins: fastestmirror, ovl Loading mirror speeds from cached hostfile epel/aarch64/metalink | 10 kB 00:00:00 * base: ftp.yz.yamagata-u.ac.jp * epel: ftp.iij.ad.jp * extras: ftp.yz.yamagata-u.ac.jp * remi-safe: ftp.riken.jp * updates: ftp.yz.yamagata-u.ac.jp base | 3.6 kB 00:00:00 extras | 2.9 kB 00:00:00 pgdg-common/7/aarch64/signature | 198 B 00:00:00 pgdg-common/7/aarch64/signature | 2.9 kB 00:00:01 !!! pgdg10/7/aarch64/signature | 198 B 00:00:00 pgdg10/7/aarch64/signature | 3.6 kB 00:00:00 !!! pgdg11/7/aarch64/signature | 198 B 00:00:00 pgdg11/7/aarch64/signature | 3.6 kB 00:00:00 !!! pgdg12/7/aarch64/signature | 198 B 00:00:00 pgdg12/7/aarch64/signature | 3.6 kB 00:00:00 !!! pgdg13/7/aarch64/signature | 198 B 00:00:00 pgdg13/7/aarch64/signature | 3.6 kB 00:00:00 !!! pgdg14/7/aarch64/signature | 198 B 00:00:00 pgdg14/7/aarch64/signature | 3.6 kB 00:00:00 !!! http://ftp.riken.jp/Linux/remi/enterprise/7/safe/aarch64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found Trying other mirror. To address this issue please refer to the below wiki article https://wiki.centos.org/yum-errors If above article doesn't help to resolve this issue please use https://bugs.centos.org/. https://repo.extreme-ix.org/remi/enterprise/7/safe/aarch64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found Trying other mirror. https://mirror.usi.edu/pub/remi/enterprise/7/safe/aarch64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found Trying other mirror. http://mirror.team-cymru.com/remi/enterprise/7/safe/aarch64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found Trying other mirror. https://mirrors.tuna.tsinghua.edu.cn/remi/enterprise/7/safe/aarch64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found Trying other mirror. https://mirror.pit.teraswitch.com/remi/enterprise/7/safe/aarch64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found Trying other mirror. http://remi.mirrors.cu.be/enterprise/7/safe/aarch64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found Trying other mirror. https://remi.mirror.karneval.cz/enterprise/7/safe/aarch64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found Trying other mirror. https://mirror.netsite.dk/remi/enterprise/7/safe/aarch64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found Trying other mirror. https://merlin.fit.vutbr.cz/mirrors/remi/enterprise/7/safe/aarch64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found Trying other mirror. https://mirror.netweaver.uk/remi/enterprise/7/safe/aarch64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found Trying other mirror. https://mirrors.uni-ruse.bg/remi/enterprise/7/safe/aarch64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found Trying other mirror. http://fr2.rpmfind.net/linux/remi/enterprise/7/safe/aarch64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found Trying other mirror. http://ftp.arnes.si/mirrors/remi/enterprise/7/safe/aarch64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found Trying other mirror. http://repo1.dal.innoscale.net/remi/enterprise/7/safe/aarch64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found Trying other mirror. http://remirepo.reloumirrors.net/enterprise/7/safe/aarch64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found Trying other mirror. https://mir01.syntis.net/remirepo/enterprise/7/safe/aarch64/repodata/repomd.xml: [Errno 14] HTTPS Error 403 - Forbidden Trying other mirror. To address this issue please refer to the below wiki article https://wiki.centos.org/yum-errors If above article doesn't help to resolve this issue please use https://bugs.centos.org/. http://mirrors.bytes.ua/remi/enterprise/7/safe/aarch64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found Trying other mirror. https://mirror.docker.ru/remi/enterprise/7/safe/aarch64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found <省略> Trying other mirror. http://mirror.veriteknik.net.tr/remi/enterprise/7/safe/aarch64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2a00:7300:1::101: Cannot assign requested address" Trying other mirror. http://remi.mirrors.arminco.com/enterprise/7/safe/aarch64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2001:4d00:10:7::144: Cannot assign requested address" Trying other mirror. https://remi.mirror.liteserver.nl/enterprise/7/safe/aarch64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2a01:6340:1:20::243: Cannot assign requested address" Trying other mirror. One of the configured repositories failed (Safe Remi's RPM repository for Enterprise Linux 7 - aarch64), 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=remi-safe ... 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 remi-safe or subscription-manager repos --disable=remi-safe 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=remi-safe.skip_if_unavailable=true failure: repodata/repomd.xml from remi-safe: [Errno 256] No more mirrors to try. http://ftp.riken.jp/Linux/remi/enterprise/7/safe/aarch64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found <省略> http://mirror.veriteknik.net.tr/remi/enterprise/7/safe/aarch64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2a00:7300:1::101: Cannot assign requested address" http://remi.mirrors.arminco.com/enterprise/7/safe/aarch64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2001:4d00:10:7::144: Cannot assign requested address" https://remi.mirror.liteserver.nl/enterprise/7/safe/aarch64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2a01:6340:1:20::243: Cannot assign requested address"

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答2

0

ベストアンサー

DockerのCentOS7で下記リポジトリをインストールするためwgetをインストールしたいです。

必要なことはファイルのダウンロードであって、そのためのツールがwgetである必然性はありません。

curlがあるならcurlでダウンロードしてしまう方法もあります。

投稿2022/09/07 09:04

maisumakun

総合スコア145184

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

0

docker-compose.ymlは基本は自分で作るなり設置するなりしないとないですよ。勝手にできるものではありませんし、他人にどこにあるかを聞いてもそれは分からないです。docker-composeの使い方はご存じでしょうか?

参考)
https://techmania.jp/blog/docker0002/
http://skmkuma.com/<docker16>docker-composeの使い方をマスターしよう/

maisumakunさんがおっしゃっているとおり、目的を果たすならwgetを無理に使うこともない気がします。

投稿2022/09/07 09:50

AbeTakashi

総合スコア4537

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問