티스토리 뷰

반응형

■ 오류 발생

스크립트를 이용해 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-50.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, product-id, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
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, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Loading mirror speeds from cached hostfile
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     
(1/16): base/other_db                                                                   | 1.3 MB  00:00:00     
(2/16): docker-ce-stable/7/x86_64/updateinfo                                            |   55 B  00:00:00     
(3/16): docker-ce-stable/7/x86_64/primary_db                                            |  69 kB  00:00:00     
(4/16): docker-ce-stable/7/x86_64/filelists_db                                          |  29 kB  00:00:00     
(5/16): docker-ce-stable/7/x86_64/other_db                                              | 121 kB  00:00:00     
(6/16): extra/prestodelta                                                               |  47 kB  00:00:00     
(7/16): extra/other_db                                                                  | 117 kB  00:00:00     
(8/16): base/filelists_db                                                               | 3.2 MB  00:00:00     
(9/16): hpe-fwpp/filelists_db                                                           | 247 kB  00:00:00     
(10/16): hpe-fwpp/other_db                                                              | 888 kB  00:00:00     
(11/16): updates/prestodelta                                                            | 341 kB  00:00:00     
(12/16): updates/other_db                                                               | 341 kB  00:00:00     
(13/16): extra/filelists_db                                                             | 230 kB  00:00:00     
(14/16): others/7/other_db                                                              | 666 kB  00:00:00     
(15/16): others/7/filelists_db                                                          | 3.1 MB  00:00:00     
(16/16): updates/filelists_db                                                           | 1.9 MB  00:00:00     
Metadata Cache Created
+ '[' -n '' ']'
+ sh -c 'yum install -y -q docker-ce'
Error: Package: docker-ce-rootless-extras-20.10.11-3.el7.x86_64 (docker-ce-stable)
           Requires: slirp4netns >= 0.4
Error: Package: docker-ce-rootless-extras-20.10.11-3.el7.x86_64 (docker-ce-stable)
           Requires: fuse-overlayfs >= 0.7
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

docker-ce-rootless-extras-20.10.11-3.el7.x86_64 패키지를 설치하려면 slirp4netns >= 0.4, fuse-overlayfs >= 0.7 패키지가 필요한데 해당 패키지가 없어서 발생하는 문제였다.

그냥 yum install 명령어로는 해당 패키지가 설치되지 않았다.

 

■ 해결 방법

그래서 설치 URL을 이용해 직접 해당 패키지들을 설치해주면 된다.

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

 

CentOS Mirror

 

mirror.centos.org

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

 

● slirp4netns 패키지 설치

$ sudo yum install http://mirror.centos.org/centos/7/extras/x86_64/Packages
/slirp4netns-0.4.3-4.el7_8.x86_64.rpm
Loaded plugins: fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
slirp4netns-0.4.3-4.el7_8.x86_64.rpm                                                    |  81 kB  00:00:00     
Examining /var/tmp/yum-root-0O3mdM/slirp4netns-0.4.3-4.el7_8.x86_64.rpm: slirp4netns-0.4.3-4.el7_8.x86_64
Marking /var/tmp/yum-root-0O3mdM/slirp4netns-0.4.3-4.el7_8.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package slirp4netns.x86_64 0:0.4.3-4.el7_8 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================
 Package              Arch            Version                 Repository                                  Size
===============================================================================================================
Installing:
 slirp4netns          x86_64          0.4.3-4.el7_8           /slirp4netns-0.4.3-4.el7_8.x86_64          169 k

Transaction Summary
===============================================================================================================
Install  1 Package

Total size: 169 k
Installed size: 169 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : slirp4netns-0.4.3-4.el7_8.x86_64                                                            1/1 
Loading mirror speeds from cached hostfile
  Verifying  : slirp4netns-0.4.3-4.el7_8.x86_64                                                            1/1 

Installed:
  slirp4netns.x86_64 0:0.4.3-4.el7_8                                                                           

Complete!


$ sudo yum info slirp4netns
Loaded plugins: fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Loading mirror speeds from cached hostfile
Installed Packages
Name        : slirp4netns
Arch        : x86_64
Version     : 0.4.3
Release     : 4.el7_8
Size        : 169 k
Repo        : installed
Summary     : slirp for network namespaces
URL         : https://github.com/rootless-containers/slirp4netns
License     : GPLv2
Description : slirp for network namespaces, without copying buffers across the namespaces.

 

● fuse3-libs 패키지 설치

$ sudo yum install http://mirror.centos.org/centos/7/extras/x86_64/Packages
/fuse3-libs-3.6.1-4.el7.x86_64.rpm
Loaded plugins: fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
fuse3-libs-3.6.1-4.el7.x86_64.rpm                                                       |  82 kB  00:00:00     
Examining /var/tmp/yum-root-0O3mdM/fuse3-libs-3.6.1-4.el7.x86_64.rpm: fuse3-libs-3.6.1-4.el7.x86_64
Marking /var/tmp/yum-root-0O3mdM/fuse3-libs-3.6.1-4.el7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package fuse3-libs.x86_64 0:3.6.1-4.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================
 Package              Arch             Version                  Repository                                Size
===============================================================================================================
Installing:
 fuse3-libs           x86_64           3.6.1-4.el7              /fuse3-libs-3.6.1-4.el7.x86_64           270 k

Transaction Summary
===============================================================================================================
Install  1 Package

Total size: 270 k
Installed size: 270 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : fuse3-libs-3.6.1-4.el7.x86_64                                                               1/1 
Loading mirror speeds from cached hostfile
  Verifying  : fuse3-libs-3.6.1-4.el7.x86_64                                                               1/1 

Installed:
  fuse3-libs.x86_64 0:3.6.1-4.el7                                                                              

Complete!

$ sudo yum info fuse3-libs
Loaded plugins: fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Loading mirror speeds from cached hostfile
Installed Packages
Name        : fuse3-libs
Arch        : x86_64
Version     : 3.6.1
Release     : 4.el7
Size        : 270 k
Repo        : installed
Summary     : File System in Userspace (FUSE) v3 libraries
URL         : http://fuse.sf.net
License     : LGPLv2+
Description : Devel With FUSE it is possible to implement a fully functional filesystem in a
            : userspace program. This package contains the FUSE v3 libraries.

 

fuse3-devel 패키지 설치

$ sudo yum install http://mirror.centos.org/centos/7/extras/x86_64/Packages
/fuse3-devel-3.6.1-4.el7.x86_64.rpm
Loaded plugins: fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
fuse3-devel-3.6.1-4.el7.x86_64.rpm                                                      |  39 kB  00:00:00     
Examining /var/tmp/yum-root-0O3mdM/fuse3-devel-3.6.1-4.el7.x86_64.rpm: fuse3-devel-3.6.1-4.el7.x86_64
Marking /var/tmp/yum-root-0O3mdM/fuse3-devel-3.6.1-4.el7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package fuse3-devel.x86_64 0:3.6.1-4.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================
 Package               Arch             Version                Repository                                 Size
===============================================================================================================
Installing:
 fuse3-devel           x86_64           3.6.1-4.el7            /fuse3-devel-3.6.1-4.el7.x86_64           143 k

Transaction Summary
===============================================================================================================
Install  1 Package

Total size: 143 k
Installed size: 143 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : fuse3-devel-3.6.1-4.el7.x86_64                                                              1/1 
Loading mirror speeds from cached hostfile
  Verifying  : fuse3-devel-3.6.1-4.el7.x86_64                                                              1/1 

Installed:
  fuse3-devel.x86_64 0:3.6.1-4.el7                                                                             

Complete!


$ sudo yum info fuse3-devel
Loaded plugins: fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Loading mirror speeds from cached hostfile
Installed Packages
Name        : fuse3-devel
Arch        : x86_64
Version     : 3.6.1
Release     : 4.el7
Size        : 143 k
Repo        : installed
Summary     : File System in Userspace (FUSE) v3 devel files
URL         : http://fuse.sf.net
License     : LGPLv2+
Description : With FUSE it is possible to implement a fully functional filesystem in a
            : userspace program. This package contains development files (headers,
            : pgk-config) to develop FUSE v3 based applications/filesystems.

 

 fuse3 패키지 설치

$ sudo yum install http://mirror.centos.org/centos/7/extras/x86_64/Packages
/fuse3-3.6.1-4.el7.x86_64.rpm
Loaded plugins: fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
fuse3-3.6.1-4.el7.x86_64.rpm                                                            |  47 kB  00:00:00     
Examining /var/tmp/yum-root-0O3mdM/fuse3-3.6.1-4.el7.x86_64.rpm: fuse3-3.6.1-4.el7.x86_64
Marking /var/tmp/yum-root-0O3mdM/fuse3-3.6.1-4.el7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package fuse3.x86_64 0:3.6.1-4.el7 will be installed
--> Processing Dependency: /etc/fuse.conf for package: fuse3-3.6.1-4.el7.x86_64
Loading mirror speeds from cached hostfile
--> Running transaction check
---> Package fuse.x86_64 0:2.9.2-11.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================
 Package            Arch                Version                   Repository                              Size
===============================================================================================================
Installing:
 fuse3              x86_64              3.6.1-4.el7               /fuse3-3.6.1-4.el7.x86_64              103 k
Installing for dependencies:
 fuse               x86_64              2.9.2-11.el7              base                                    86 k

Transaction Summary
===============================================================================================================
Install  1 Package (+1 Dependent package)

Total size: 188 k
Total download size: 86 k
Installed size: 321 k
Is this ok [y/d/N]: y
Downloading packages:
fuse-2.9.2-11.el7.x86_64.rpm                                                            |  86 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : fuse-2.9.2-11.el7.x86_64                                                                    1/2 
  Installing : fuse3-3.6.1-4.el7.x86_64                                                                    2/2 
  Verifying  : fuse-2.9.2-11.el7.x86_64                                                                    1/2 
  Verifying  : fuse3-3.6.1-4.el7.x86_64                                                                    2/2 

Installed:
  fuse3.x86_64 0:3.6.1-4.el7                                                                                   

Dependency Installed:
  fuse.x86_64 0:2.9.2-11.el7                                                                                   

Complete!


$ sudo yum info fuse3
Loaded plugins: fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Loading mirror speeds from cached hostfile
Installed Packages
Name        : fuse3
Arch        : x86_64
Version     : 3.6.1
Release     : 4.el7
Size        : 103 k
Repo        : installed
Summary     : File System in Userspace (FUSE) v3 utilities
URL         : http://fuse.sf.net
License     : GPL+
Description : With FUSE it is possible to implement a fully functional filesystem in a
            : userspace program. This package contains the FUSE v3 userspace tools to
            : mount a FUSE filesystem.

 

fuse-overlayfs 패키지 설치

$ sudo yum install http://mirror.centos.org/centos/7/extras/x86_64/Packages
/fuse-overlayfs-0.7.2-6.el7_8.x86_64.rpm
Loaded plugins: fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
fuse-overlayfs-0.7.2-6.el7_8.x86_64.rpm                                                 |  54 kB  00:00:00     
Examining /var/tmp/yum-root-0O3mdM/fuse-overlayfs-0.7.2-6.el7_8.x86_64.rpm: fuse-overlayfs-0.7.2-6.el7_8.x86_64
Marking /var/tmp/yum-root-0O3mdM/fuse-overlayfs-0.7.2-6.el7_8.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package fuse-overlayfs.x86_64 0:0.7.2-6.el7_8 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================
 Package               Arch          Version                 Repository                                   Size
===============================================================================================================
Installing:
 fuse-overlayfs        x86_64        0.7.2-6.el7_8           /fuse-overlayfs-0.7.2-6.el7_8.x86_64        116 k

Transaction Summary
===============================================================================================================
Install  1 Package

Total size: 116 k
Installed size: 116 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : fuse-overlayfs-0.7.2-6.el7_8.x86_64                                                         1/1 
Loading mirror speeds from cached hostfile
  Verifying  : fuse-overlayfs-0.7.2-6.el7_8.x86_64                                                         1/1 

Installed:
  fuse-overlayfs.x86_64 0:0.7.2-6.el7_8                                                                        

Complete!


$ sudo yum info fuse-overlayfs 
Loaded plugins: fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Loading mirror speeds from cached hostfile
Installed Packages
Name        : fuse-overlayfs
Arch        : x86_64
Version     : 0.7.2
Release     : 6.el7_8
Size        : 116 k
Repo        : installed
Summary     : FUSE overlay+shiftfs implementation for rootless containers
URL         : https://github.com/containers/fuse-overlayfs
License     : GPLv3+
Description : FUSE overlay+shiftfs implementation for rootless containers.

 

● 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-50.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, product-id, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
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, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Loading mirror speeds from cached hostfile
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     
Metadata Cache Created
+ '[' -n '' ']'
+ sh -c 'yum install -y -q docker-ce'
warning: /var/cache/yum/x86_64/7/docker-ce-stable/packages/docker-ce-20.10.11-3.el7.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY
Public key for docker-ce-20.10.11-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.11-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/

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

 

반응형
댓글