Yum을 사용하여 패키지를 설치할 때 오류가 발생했습니다.

Yum을 사용하여 패키지를 설치할 때 오류가 발생했습니다.
[ec2-user@ip-172-31-27-82 ~]$ sudo yum install yum-utils
Loaded plugins: priorities, update-motd, upgrade-helper
http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml: (28, 'Connection timed out after 5000 milliseconds')
Trying other mirror.
http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml: (28, 'Connection timed out after 5001 milliseconds')
Trying other mirror.
http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml: (28, 'Connection timed out after 5001 milliseconds')
Trying other mirror.
Could not retrieve mirrorlist http://repo.ap-south-1.amazonaws.com/latest/main/mirror.list error was
12: Timeout on http://repo.ap-south-1.amazonaws.com/latest/main/mirror.list: (28, 'Connection timed out after 5000 milliseconds')


 One of the configured repositories failed (Unknown),
 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. Disable the repository, 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 <repoid>

     4. 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=<repoid>.skip_if_unavailable=true

나는 노력했다

yum clean all
yum repolist

오류가 여전히 존재합니다.

산출sudo yum repolist all

[ec2-user@ip-172-31-27-82 ~]$ sudo yum repolist all
Loaded plugins: priorities, update-motd, upgrade-helper
Could not retrieve mirrorlist http://repo.ap-south-1.amazonaws.com/latest/main/mirror.list error was
12: Timeout on http://repo.ap-south-1.amazonaws.com/latest/main/mirror.list: (28, 'Connection timed out after 5000 milliseconds')
CentOS/primary_db              FAILED                                          
http://mirror.centos.org/centos/7/os/x86_64/repodata/0c34273ad0292747ee5e15c047d3e51c67ca59861a446972db45d71abacc7ad7-primary.sqlite.bz2: [Errno 12] Timeout on http://mirror.centos.org/centos/7/os/x86_64/repodata/0c34273ad0292747ee5e15c047d3e51c67ca59861a446972db45d71abacc7ad7-primary.sqlite.bz2: (28, 'Connection timed out after 5000 milliseconds')
Trying other mirror.
CentOS/primary_db              FAILED                                          
http://mirror.centos.org/centos/7/os/x86_64/repodata/0c34273ad0292747ee5e15c047d3e51c67ca59861a446972db45d71abacc7ad7-primary.sqlite.bz2: [Errno 12] Timeout on http://mirror.centos.org/centos/7/os/x86_64/repodata/0c34273ad0292747ee5e15c047d3e51c67ca59861a446972db45d71abacc7ad7-primary.sqlite.bz2: (28, 'Connection timed out after 5000 milliseconds')
Trying other mirror.
CentOS/primary_db              FAILED                                          
http://mirror.centos.org/centos/7/os/x86_64/repodata/0c34273ad0292747ee5e15c047d3e51c67ca59861a446972db45d71abacc7ad7-primary.sqlite.bz2: [Errno 12] Timeout on http://mirror.centos.org/centos/7/os/x86_64/repodata/0c34273ad0292747ee5e15c047d3e51c67ca59861a446972db45d71abacc7ad7-primary.sqlite.bz2: (28, 'Connection timed out after 5000 milliseconds')
Trying other mirror.
http://mirror.centos.org/centos/7/os/x86_64/repodata/0c34273ad0292747ee5e15c047d3e51c67ca59861a446972db45d71abacc7ad7-primary.sqlite.bz2: [Errno 12] Timeout on http://mirror.centos.org/centos/7/os/x86_64/repodata/0c34273ad0292747ee5e15c047d3e51c67ca59861a446972db45d71abacc7ad7-primary.sqlite.bz2: (28, 'Connection timed out after 5000 milliseconds')
Trying other mirror.
http://mirror.centos.org/centos/7/os/x86_64/repodata/0c34273ad0292747ee5e15c047d3e51c67ca59861a446972db45d71abacc7ad7-primary.sqlite.bz2: [Errno 12] Timeout on http://mirror.centos.org/centos/7/os/x86_64/repodata/0c34273ad0292747ee5e15c047d3e51c67ca59861a446972db45d71abacc7ad7-primary.sqlite.bz2: (28, 'Connection timed out after 5000 milliseconds')
Trying other mirror.
http://mirror.centos.org/centos/7/os/x86_64/repodata/0c34273ad0292747ee5e15c047d3e51c67ca59861a446972db45d71abacc7ad7-primary.sqlite.bz2: [Errno 12] Timeout on http://mirror.centos.org/centos/7/os/x86_64/repodata/0c34273ad0292747ee5e15c047d3e51c67ca59861a446972db45d71abacc7ad7-primary.sqlite.bz2: (28, 'Connection timed out after 5000 milliseconds')
Trying other mirror.
Could not retrieve mirrorlist http://repo.ap-south-1.amazonaws.com/latest/updates/mirror.list error was
12: Timeout on http://repo.ap-south-1.amazonaws.com/latest/updates/mirror.list: (28, 'Connection timed out after 5000 milliseconds')
repo id                                                                        repo name                                                                status
CentOS                                                                         centos                                                                   enabled: 0
amzn-main/latest                                                               amzn-main-Base                                                           enabled: 0
amzn-main-debuginfo/latest                                                     amzn-main-debuginfo                                                      disabled
amzn-main-source/latest                                                        amzn-main-source                                                         disabled
amzn-nosrc/latest                                                              amzn-nosrc-Base                                                          disabled
amzn-preview/latest                                                            amzn-preview-Base                                                        disabled
amzn-preview-debuginfo/latest                                                  amzn-preview-debuginfo                                                   disabled
amzn-preview-source/latest                                                     amzn-preview-source                                                      disabled
amzn-updates/latest                                                            amzn-updates-Base                                                        enabled: 0
amzn-updates-debuginfo/latest                                                  amzn-updates-debuginfo                                                   disabled
amzn-updates-source/latest                                                     amzn-updates-source                                                      disabled
repolist: 0


Loaded plugins: priorities, update-motd, upgrade-helper
CentOS                                                                                                                                     | 3.6 kB  00:00:00     
Could not retrieve mirrorlist http://repo.ap-south-1.amazonaws.com/latest/updates/mirror.list error was
12: Timeout on http://repo.ap-south-1.amazonaws.com/latest/updates/mirror.list: (28, 'Connection timed out after 5001 milliseconds')


 One of the configured repositories failed (Unknown),
 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. Disable the repository, 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 <repoid>

     4. 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=<repoid>.skip_if_unavailable=true

Cannot find a valid baseurl for repo: amzn-updates/latest

답변1

@IgnacioVazquez-Abrams가 언급했듯이 네트워크 연결이 없으므로 yum패키지를 설치할 수 없습니다

답변2

나는 몇 가지를 보았습니다. 당신이 프록시 뒤에 있을 수도 있습니다. 다음을 추가했습니다.

proxy=http<your FQDN proxy settings including port here>

...파일로 /etc/yum.conf(CentOS 7을 사용하고 있습니다)

화타이

관련 정보