티스토리 뷰

반응형

■ 오류 발생

스크립트를 이용해 Docker를 설치하는 도중 아래와 같은 오류가 발생했다.

$ curl -fsSL https://get.docker.com/ | sudo sh
# Executing docker install script, commit: 93d2499759296ac1f9c510605fef85052a2c32be
+ sh -c 'yum install -y -q yum-utils'
Package yum-utils-1.1.31-42.el7.noarch already installed and latest version
+ sh -c 'yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo'
Loaded plugins: fastestmirror, langpacks
adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
grabbing file https://download.docker.com/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo
repo saved to /etc/yum.repos.d/docker-ce.repo
+ '[' stable '!=' stable ']'
+ sh -c 'yum makecache'
Loaded plugins: fastestmirror, langpacks
base                                                                                     | 3.6 kB  00:00:00
docker-ce-stable                                                                         | 3.5 kB  00:00:00
extra                                                                                    | 3.4 kB  00:00:00
hpe-fwpp                                                                                 | 2.5 kB  00:00:00
others                                                                                   | 2.9 kB  00:00:00
updates                                                                                  | 3.4 kB  00:00:00
Loading mirror speeds from cached hostfile
Metadata Cache Created
+ '[' -n '' ']'
+ sh -c 'yum install -y -q docker-ce'
Error: Package: libselinux-devel-2.5-11.el7.x86_64 (@base)
           Requires: libselinux(x86-64) = 2.5-11.el7
           Removing: libselinux-2.5-11.el7.x86_64 (@base)
               libselinux(x86-64) = 2.5-11.el7
           Updated By: libselinux-2.5-15.el7.x86_64 (others)
               libselinux(x86-64) = 2.5-15.el7
           Available: libselinux-2.5-14.1.el7.x86_64 (others)
               libselinux(x86-64) = 2.5-14.1.el7
Error: Package: libsepol-devel-2.5-6.el7.x86_64 (@base)
           Requires: libsepol(x86-64) = 2.5-6.el7
           Removing: libsepol-2.5-6.el7.x86_64 (@anaconda)
               libsepol(x86-64) = 2.5-6.el7
           Updated By: libsepol-2.5-10.el7.x86_64 (others)
               libsepol(x86-64) = 2.5-10.el7
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

 

지난번에 발생한 오류와 비슷한 문제...

https://miiingo.tistory.com/386

 

[CentOS 7] Docker 설치 시 docker-ce-rootless-extras-20.10.11-3.el7.x86_64 패키지 오류 해결 방법

■ 오류 발생 스크립트를 이용해 Docker를 설치하는 도중 아래와 같은 오류가 발생했다. $ curl -fsSL https://get.docker.com/ | sudo sh # Executing docker install script, commit: 93d2499759296ac1f9c510605..

miiingo.tistory.com

 

■ 해결 방법

그래서 이것도 지난번과 동일하게 설치 URL을 이용해 직접 해당 패키지들을 설치해주면 된다.

http://mirror.centos.org/centos/7/os/x86_64/Packages/

이 페이지에 들어가면 설치 가능한 패키지들이 쭉 나오는데 여기서 필요한 패키지의 링크를 복사해 yum install 명령을 수행해주면 된다.

 

● libsepol-devel 패키지 설치

$ sudo yum install http://mirror.centos.org/centos/7/os/x86_64/Packages/libsepol-devel-2.5-10.el7.x86_64.rpm
Loaded plugins: fastestmirror, langpacks
libsepol-devel-2.5-10.el7.x86_64.rpm                                                     |  77 kB  00:00:00
Examining /var/tmp/yum-root-JuSvQm/libsepol-devel-2.5-10.el7.x86_64.rpm: libsepol-devel-2.5-10.el7.x86_64
Marking /var/tmp/yum-root-JuSvQm/libsepol-devel-2.5-10.el7.x86_64.rpm as an update to libsepol-devel-2.5-6.el7.x86_64
Resolving Dependencies
--> Running transaction check
---> Package libsepol-devel.x86_64 0:2.5-6.el7 will be updated
---> Package libsepol-devel.x86_64 0:2.5-10.el7 will be an update
--> Processing Dependency: libsepol(x86-64) = 2.5-10.el7 for package: libsepol-devel-2.5-10.el7.x86_64
Loading mirror speeds from cached hostfile
--> Running transaction check
---> Package libsepol.i686 0:2.5-6.el7 will be updated
---> Package libsepol.x86_64 0:2.5-6.el7 will be updated
---> Package libsepol.i686 0:2.5-10.el7 will be an update
---> Package libsepol.x86_64 0:2.5-10.el7 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================
 Package                 Arch            Version               Repository                                  Size
================================================================================================================
Updating:
 libsepol-devel          x86_64          2.5-10.el7            /libsepol-devel-2.5-10.el7.x86_64          124 k
Updating for dependencies:
 libsepol                i686            2.5-10.el7            others                                     294 k
 libsepol                x86_64          2.5-10.el7            others                                     297 k

Transaction Summary
================================================================================================================
Upgrade  1 Package (+2 Dependent packages)

Total size: 715 k
Total download size: 591 k
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/2): libsepol-2.5-10.el7.i686.rpm                                                      | 294 kB  00:00:00
(2/2): libsepol-2.5-10.el7.x86_64.rpm                                                    | 297 kB  00:00:00
----------------------------------------------------------------------------------------------------------------
Total                                                                           1.1 MB/s | 591 kB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : libsepol-2.5-10.el7.x86_64                                                                   1/6
  Updating   : libsepol-devel-2.5-10.el7.x86_64                                                             2/6
  Updating   : libsepol-2.5-10.el7.i686                                                                     3/6
  Cleanup    : libsepol-devel-2.5-6.el7.x86_64                                                              4/6
  Cleanup    : libsepol-2.5-6.el7                                                                           5/6
  Cleanup    : libsepol-2.5-6.el7                                                                           6/6
  Verifying  : libsepol-2.5-10.el7.i686                                                                     1/6
  Verifying  : libsepol-2.5-10.el7.x86_64                                                                   2/6
  Verifying  : libsepol-devel-2.5-10.el7.x86_64                                                             3/6
  Verifying  : libsepol-2.5-6.el7.i686                                                                      4/6
  Verifying  : libsepol-2.5-6.el7.x86_64                                                                    5/6
  Verifying  : libsepol-devel-2.5-6.el7.x86_64                                                              6/6

Updated:
  libsepol-devel.x86_64 0:2.5-10.el7

Dependency Updated:
  libsepol.i686 0:2.5-10.el7                            libsepol.x86_64 0:2.5-10.el7

Complete!

 

● libselinux-devel 패키지 설치

$ sudo yum install http://mirror.centos.org/centos/7/os/x86_64/Packages/libselinux-devel-2.5-15.el7.x86_64.rpm
Loaded plugins: fastestmirror, langpacks
libselinux-devel-2.5-15.el7.x86_64.rpm                                                   | 187 kB  00:00:00
Examining /var/tmp/yum-root-JuSvQm/libselinux-devel-2.5-15.el7.x86_64.rpm: libselinux-devel-2.5-15.el7.x86_64
Marking /var/tmp/yum-root-JuSvQm/libselinux-devel-2.5-15.el7.x86_64.rpm as an update to libselinux-devel-2.5-11.el7.x86_64
Resolving Dependencies
--> Running transaction check
---> Package libselinux-devel.x86_64 0:2.5-11.el7 will be updated
---> Package libselinux-devel.x86_64 0:2.5-15.el7 will be an update
--> Processing Dependency: libselinux(x86-64) = 2.5-15.el7 for package: libselinux-devel-2.5-15.el7.x86_64
Loading mirror speeds from cached hostfile
--> Running transaction check
---> Package libselinux.i686 0:2.5-11.el7 will be updated
---> Package libselinux.x86_64 0:2.5-11.el7 will be updated
--> Processing Dependency: libselinux(x86-64) = 2.5-11.el7 for package: libselinux-utils-2.5-11.el7.x86_64
--> Processing Dependency: libselinux(x86-64) = 2.5-11.el7 for package: libselinux-python-2.5-11.el7.x86_64
---> Package libselinux.i686 0:2.5-15.el7 will be an update
---> Package libselinux.x86_64 0:2.5-15.el7 will be an update
--> Running transaction check
---> Package libselinux-python.x86_64 0:2.5-11.el7 will be updated
---> Package libselinux-python.x86_64 0:2.5-15.el7 will be an update
---> Package libselinux-utils.x86_64 0:2.5-11.el7 will be updated
---> Package libselinux-utils.x86_64 0:2.5-15.el7 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================
 Package                   Arch           Version             Repository                                   Size
================================================================================================================
Updating:
 libselinux-devel          x86_64         2.5-15.el7          /libselinux-devel-2.5-15.el7.x86_64         190 k
Updating for dependencies:
 libselinux                i686           2.5-15.el7          others                                      166 k
 libselinux                x86_64         2.5-15.el7          others                                      162 k
 libselinux-python         x86_64         2.5-15.el7          others                                      236 k
 libselinux-utils          x86_64         2.5-15.el7          others                                      151 k

Transaction Summary
================================================================================================================
Upgrade  1 Package (+4 Dependent packages)

Total size: 904 k
Total download size: 715 k
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/4): libselinux-2.5-15.el7.i686.rpm                                                    | 166 kB  00:00:00
(2/4): libselinux-2.5-15.el7.x86_64.rpm                                                  | 162 kB  00:00:00
(3/4): libselinux-utils-2.5-15.el7.x86_64.rpm                                            | 151 kB  00:00:00
(4/4): libselinux-python-2.5-15.el7.x86_64.rpm                                           | 236 kB  00:00:00
----------------------------------------------------------------------------------------------------------------
Total                                                                           4.9 MB/s | 715 kB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : libselinux-2.5-15.el7.x86_64                                                                1/10
  Updating   : libselinux-devel-2.5-15.el7.x86_64                                                          2/10
  Updating   : libselinux-python-2.5-15.el7.x86_64                                                         3/10
  Updating   : libselinux-utils-2.5-15.el7.x86_64                                                          4/10
  Updating   : libselinux-2.5-15.el7.i686                                                                  5/10
  Cleanup    : libselinux-devel-2.5-11.el7.x86_64                                                          6/10
  Cleanup    : libselinux-2.5-11.el7                                                                       7/10
  Cleanup    : libselinux-utils-2.5-11.el7.x86_64                                                          8/10
  Cleanup    : libselinux-python-2.5-11.el7.x86_64                                                         9/10
  Cleanup    : libselinux-2.5-11.el7                                                                      10/10
  Verifying  : libselinux-devel-2.5-15.el7.x86_64                                                          1/10
  Verifying  : libselinux-2.5-15.el7.x86_64                                                                2/10
  Verifying  : libselinux-2.5-15.el7.i686                                                                  3/10
  Verifying  : libselinux-python-2.5-15.el7.x86_64                                                         4/10
  Verifying  : libselinux-utils-2.5-15.el7.x86_64                                                          5/10
  Verifying  : libselinux-utils-2.5-11.el7.x86_64                                                          6/10
  Verifying  : libselinux-devel-2.5-11.el7.x86_64                                                          7/10
  Verifying  : libselinux-2.5-11.el7.x86_64                                                                8/10
  Verifying  : libselinux-2.5-11.el7.i686                                                                  9/10
  Verifying  : libselinux-python-2.5-11.el7.x86_64                                                        10/10

Updated:
  libselinux-devel.x86_64 0:2.5-15.el7

Dependency Updated:
  libselinux.i686 0:2.5-15.el7          libselinux.x86_64 0:2.5-15.el7  libselinux-python.x86_64 0:2.5-15.el7
  libselinux-utils.x86_64 0:2.5-15.el7

Complete!

 

● Docker 재설치

이제 다시 Docker 설치 스크립트를 실행하면 설치가 정상적으로 완료된다.

$ curl -fsSL https://get.docker.com/ | sudo sh
# Executing docker install script, commit: 93d2499759296ac1f9c510605fef85052a2c32be
+ sh -c 'yum install -y -q yum-utils'
Package yum-utils-1.1.31-42.el7.noarch already installed and latest version
+ sh -c 'yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo'
Loaded plugins: fastestmirror, langpacks
adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
grabbing file https://download.docker.com/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo
repo saved to /etc/yum.repos.d/docker-ce.repo
+ '[' stable '!=' stable ']'
+ sh -c 'yum makecache'
Loaded plugins: fastestmirror, langpacks
base                                                                                     | 3.6 kB  00:00:00
docker-ce-stable                                                                         | 3.5 kB  00:00:00
extra                                                                                    | 3.4 kB  00:00:00
hpe-fwpp                                                                                 | 2.5 kB  00:00:00
others                                                                                   | 2.9 kB  00:00:00
updates                                                                                  | 3.4 kB  00:00:00
Loading mirror speeds from cached hostfile
Metadata Cache Created
+ '[' -n '' ']'
+ sh -c 'yum install -y -q docker-ce'
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
warning: /var/cache/yum/x86_64/7/docker-ce-stable/packages/docker-ce-20.10.12-3.el7.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY
Public key for docker-ce-20.10.12-3.el7.x86_64.rpm is not installed
Importing GPG key 0x621E9F35:
 Userid     : "Docker Release (CE rpm) <docker@docker.com>"
 Fingerprint: 060a 61c5 1b55 8a7f 742b 77aa c52f eb6b 621e 9f35
 From       : https://download.docker.com/linux/centos/gpg
setsebool:  SELinux is disabled.
+ version_gte 20.10
+ '[' -z '' ']'
+ return 0
+ sh -c 'yum install -y -q docker-ce-rootless-extras'
Package docker-ce-rootless-extras-20.10.12-3.el7.x86_64 already installed and latest version

================================================================================

To run Docker as a non-privileged user, consider setting up the
Docker daemon in rootless mode for your user:

    dockerd-rootless-setuptool.sh install

Visit https://docs.docker.com/go/rootless/ to learn about rootless mode.


To run the Docker daemon as a fully privileged service, but granting non-root
users access, refer to https://docs.docker.com/go/daemon-access/

WARNING: Access to the remote API on a privileged Docker daemon is equivalent
         to root access on the host. Refer to the 'Docker daemon attack surface'
         documentation for details: https://docs.docker.com/go/attack-surface/

================================================================================

 

반응형
댓글
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/12   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
글 보관함