Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installer fails on CentOS8, unmet dep slirp4netns #204

Closed
desnij opened this issue Dec 15, 2020 · 15 comments
Closed

installer fails on CentOS8, unmet dep slirp4netns #204

desnij opened this issue Dec 15, 2020 · 15 comments

Comments

@desnij
Copy link

desnij commented Dec 15, 2020

Sorry, I am not sure if this is the correct place to put this, but the installer is failing with dependency issues. docker-ce-rootless-extras seems to require slirp4netns.

FWIW I had installed docker on a server on Friday, that server doesn't have docker-ce-rootless-extras installed, which is what seems to depend on slirp4netns.

# curl -fsSL https://get.docker.com | sudo bash

# Executing docker install script, commit: 3d8fe77c2c46c5b7571f94b42793905e5b3e42e4
+ sh -c 'yum install -y -q yum-utils'
+ sh -c 'yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo'
Adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
+ '[' stable '!=' stable ']'
+ sh -c 'yum makecache'
CentOS-8 - AppStream                                                                  8.5 kB/s | 4.3 kB     00:00    
CentOS-8 - Base                                                                        19 kB/s | 3.9 kB     00:00    
CentOS-8 - Extras                                                                     7.0 kB/s | 1.5 kB     00:00    
Docker CE Stable - x86_64                                                              12 kB/s | 3.5 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64                                 48 kB/s |  18 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                                        151 kB/s |  18 kB     00:00   
Metadata cache created.
+ '[' -n '' ']'
+ sh -c 'yum install -y -q docker-ce'
Error: 
 Problem: package docker-ce-3:20.10.1-3.el8.x86_64 requires docker-ce-rootless-extras, but none of the providers can be installed
  - package docker-ce-rootless-extras-20.10.0-3.el8.x86_64 requires slirp4netns >= 0.4, but none of the providers can be installed
  - package docker-ce-rootless-extras-20.10.1-3.el8.x86_64 requires slirp4netns >= 0.4, but none of the providers can be installed
  - cannot install the best candidate for the job
  - package slirp4netns-0.4.2-3.git21fdece.module_el8.3.0+479+69e2ae26.x86_64 is filtered out by modular filtering
  - package slirp4netns-1.1.4-2.module_el8.3.0+475+c50ce30b.x86_64 is filtered out by modular filtering
  - package slirp4netns-0.4.2-3.git21fdece.module_el8.2.0+304+65a3c2ac.x86_64 is filtered out by modular filtering
  - package slirp4netns-0.4.2-3.git21fdece.module_el8.2.0+305+5e198a41.x86_64 is filtered out by modular filtering

thanks folks

@AkihiroSuda
Copy link
Contributor

AkihiroSuda commented Dec 16, 2020

package slirp4netns-0.4.2-3.git21fdece.module_el8.2.0+305+5e198a41.x86_64 is filtered out by modular filtering

Please try dnf remove slirp4netns then dnf install slirp4netns

@desnij
Copy link
Author

desnij commented Dec 16, 2020

Thanks for your response,
As it turns out slirp4netns was never installed since it can not be found ( note the repos used below ). However, there are 3 versions found in the app-stream which seem to be incompatible with this installation http://mirror.centos.org/centos/8/AppStream/x86_64/os/Package.

fwiw, by using --nobest to the cli it will install not requiring slirp4netns

# dnf remove slirp4netns
No match for argument: slirp4netns
No packages marked for removal.
Dependencies resolved.
Nothing to do.
Complete!
# dnf search slirp4netns
Last metadata expiration check: 0:00:55 ago on Wed 16 Dec 2020 09:25:57 AM EST.
CentOS-8 - AppStream                                                                  8.5 kB/s | 4.3 kB     00:00    
CentOS-8 - Base                                                                        19 kB/s | 3.9 kB     00:00    
CentOS-8 - Extras                                                                     7.0 kB/s | 1.5 kB     00:00    
Docker CE Stable - x86_64                                                              12 kB/s | 3.5 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64                                 48 kB/s |  18 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                                        151 kB/s |  18 kB     00:00   
No matches found.

thank you :)

@varyumin
Copy link

Hello everyone! Could somebody fix it?

@cascading-jox
Copy link

I get the same error.

@AkihiroSuda
Copy link
Contributor

AkihiroSuda commented Jan 23, 2021

Seems working fine on clean install of CentOS 8.3 (docker-ce-cli-20.10.2-3.el8.x86_64, slirp4netns-1.1.4-2.module_el8.3.0+475+c50ce30b.x86_64).

Logs

$ cat Vagrantfile 
Vagrant.configure("2") do |config|
  config.vm.box = "centos/8"
  config.vm.provider :virtualbox do |v|
    v.memory = 2048
    v.cpus = 2
  end
  config.vm.provision "shell", inline: <<-SHELL
  set -eux -o pipefail
  curl -fsSL https://get.docker.com | sh
  SHELL
end

$ vagrant up 
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'centos/8'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'centos/8' version '2011.0' is up to date...
==> default: Setting the name of the VM: centos8_default_1611411531678_32930
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: 
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default: 
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if it's present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
    default: No guest additions were detected on the base box for this VM! Guest
    default: additions are required for forwarded ports, shared folders, host only
    default: networking, and more. If SSH fails on this machine, please install
    default: the guest additions and repackage the box to continue.
    default: 
    default: This is not an error message; everything may continue to work properly,
    default: in which case you may ignore this message.
==> default: Rsyncing folder: /Users/suda/vagrant/centos8/ => /vagrant
==> default: Running provisioner: shell...
    default: Running: inline script
    default: ++ curl -fsSL https://get.docker.com
    default: ++ sh
    default: # Executing docker install script, commit: 3d8fe77c2c46c5b7571f94b42793905e5b3e42e4
    default: + sh -c 'yum install -y -q yum-utils'
    default: + sh -c 'yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo'
    default: Adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
    default: + '[' stable '!=' stable ']'
    default: + sh -c 'yum makecache'
    default: CentOS Linux 8 - AppStream                      7.7 kB/s | 4.3 kB     00:00    
    default: CentOS Linux 8 - BaseOS                         7.5 kB/s | 3.9 kB     00:00    
    default: CentOS Linux 8 - Extras                         2.2 kB/s | 1.5 kB     00:00    
    default: Docker CE Stable - x86_64                        50 kB/s | 7.8 kB     00:00    
    default: Metadata cache created.
    default: + '[' -n '' ']'
    default: + sh -c 'yum install -y -q docker-ce'
    default: warning: /var/cache/dnf/appstream-fd636d66ef3d60cc/packages/container-selinux-2.144.0-1.module_el8.3.0+475+c50ce30b.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 8483c65d: NOKEY
    default: Importing GPG key 0x8483C65D:
    default:  Userid     : "CentOS (CentOS Official Signing Key) <security@centos.org>"
    default:  Fingerprint: 99DB 70FA E1D7 CE22 7FB6 4882 05B5 55B3 8483 C65D
    default:  From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
    default: warning: /var/cache/dnf/docker-ce-stable-fa9dc42ab4cec2f4/packages/containerd.io-1.4.3-3.1.el8.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY
    default: Importing GPG key 0x621E9F35:
    default:  Userid     : "Docker Release (CE rpm) <docker@docker.com>"
    default:  Fingerprint: 060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35
    default:  From       : https://download.docker.com/linux/centos/gpg
    default: If you would like to use Docker as a non-root user, you should now consider
    default: adding your user to the "docker" group with something like:
    default: 
    default:   sudo usermod -aG docker your-user
    default: 
    default: Remember that you will have to log out and back in for this to take effect!
    default: 
    default: WARNING: Adding a user to the "docker" group will grant the ability to run
    default:          containers which can be used to obtain root privileges on the
    default:          docker host.
    default:          Refer to https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface
    default:          for more information.
$ vagrant ssh -- rpm -qa centos* docker* slirp* | sort
centos-gpg-keys-8-2.el8.noarch
centos-linux-release-8.3-1.2011.el8.noarch
centos-linux-repos-8-2.el8.noarch
docker-ce-20.10.2-3.el8.x86_64
docker-ce-cli-20.10.2-3.el8.x86_64
docker-ce-rootless-extras-20.10.2-3.el8.x86_64
slirp4netns-1.1.4-2.module_el8.3.0+475+c50ce30b.x86_64

@shakeme
Copy link

shakeme commented Feb 11, 2021

I had the same probem and was able to reproduce and solve it.

You need to enable the container-tools.
dnf -y module enable container-tools

Problem explained:
When i set up the instance i installed docker with an ansible role from geerlingguy (ansible-role-docker). Before version 3.0.0 this role disabled the containter-tools module to make an install of docker 19.x possible. With docker 20.x you need this module activated to be able to install docker. The ansible role itself is just "not disabling" the module anymore for a good reason.

I hope i can help someone with this. :)

@chrisinmtown
Copy link

chrisinmtown commented May 12, 2021

Similar problem on RHEL 7.4 running on bare metal, cannot install package docker-ce-rootless-extras due to missing dependencies; and RHEL7 does not have dnf so I cannot try the solution mentioned by @shakeme to enable container-tools.

Error: Package: docker-ce-rootless-extras-20.10.6-3.el7.x86_64 (docker-ce-stable)
           Requires: slirp4netns >= 0.4
Error: Package: 3:docker-ce-20.10.6-3.el7.x86_64 (docker-ce-stable)
           Requires: container-selinux >= 2:2.74
Error: Package: docker-ce-rootless-extras-20.10.6-3.el7.x86_64 (docker-ce-stable)
           Requires: fuse-overlayfs >= 0.7
Error: Package: containerd.io-1.4.4-3.1.el7.x86_64 (docker-ce-stable)
           Requires: container-selinux >= 2:2.74

Also tried for slirp4netns on its own:

# yum install slirp4netns
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
No package slirp4netns available.
Error: Nothing to do

A stackoverflow answer put me on to this repo, created /etc/yum.repos.d/centos-extras.repo with this content:

[centos-extras]
name=Centos extras - $basearch
baseurl=http://mirror.centos.org/centos/7/extras/x86_64
enabled=1
gpgcheck=0

Then the dependencies were found.

@safoorsafdar
Copy link

I am having a similar issue, I am using OL7 on ARM-based server.

[opc@instance-20211009-1259 ~]$ sudo yum install docker-ce docker-ce-cli containerd.io -y
Loaded plugins: langpacks, ulninfo
Resolving Dependencies
--> Running transaction check
---> Package containerd.io.aarch64 0:1.4.11-3.1.el7 will be installed
---> Package docker-ce.aarch64 3:20.10.9-3.el7 will be installed
--> Processing Dependency: docker-ce-rootless-extras for package: 3:docker-ce-20.10.9-3.el7.aarch64
---> Package docker-ce-cli.aarch64 1:20.10.9-3.el7 will be installed
--> Running transaction check
---> Package docker-ce-rootless-extras.aarch64 0:20.10.9-3.el7 will be installed
--> Processing Dependency: fuse-overlayfs >= 0.7 for package: docker-ce-rootless-extras-20.10.9-3.el7.aarch64
--> Processing Dependency: slirp4netns >= 0.4 for package: docker-ce-rootless-extras-20.10.9-3.el7.aarch64
--> Finished Dependency Resolution
Error: Package: docker-ce-rootless-extras-20.10.9-3.el7.aarch64 (docker-ce-stable)
           Requires: slirp4netns >= 0.4
Error: Package: docker-ce-rootless-extras-20.10.9-3.el7.aarch64 (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

Any idea how I can fix this issue?

@mxchinegod
Copy link

Still broken. What a shame.

@safoorsafdar
Copy link

Anyone else who is still facing this issue, I was able to fix this issue by enabling developer repo.
sudo yum-config-manager --enable ol7_developer

@mariocrist
Copy link

mariocrist commented Oct 22, 2021

To fix it, Oracle Linux developer repo should be enabled. In the current Oracle Linux version from Oracle cloud it can be done by editing /etc/yum.repos.d/oraclelinux-developer-ol7.repo, where in a block [ol7_developer] value enabled should be set to 1.

https://stackoverflow.com/a/69497031/2788183

@AlexisHW
Copy link

On Oracle Linux Server 7.9 I had a similar issue when installing docker-ce
Error: Package: docker-ce-rootless-extras-20.10.12-3.el7.aarch64 (docker-ce-stable)
Requires: fuse-overlayfs >= 0.7
Error: Package: docker-ce-rootless-extras-20.10.12-3.el7.aarch64 (docker-ce-stable)
Requires: slirp4netns >= 0.4

sudo yum-config-manager --enable ol7_developer
fixed the issue for me

@sergey-sml
Copy link

On the RHEL 7 dependencies can be resolved by enabling extras repo:
yum-config-manager --enable rhel-7-server-rhui-extras-rpms

@14by12
Copy link

14by12 commented Apr 12, 2022

on RHEL 7.6 the below helped me
$vi /etc/yum.repos.d/docker-ce.repo
at the starting add below
[centos-extras]
name=Centos extras - $basearch
baseurl=http://mirror.centos.org/centos/7/extras/x86_64
enabled=1
gpgcheck=1
gpgkey=http://centos.org/keys/RPM-GPG-KEY-CentOS-7

Then run the installation command to install dependent packages

sudo yum -y install slirp4netns fuse-overlayfs container-selinux

now install docker

sudo yum install docker-ce docker-ce-cli containerd.io

@desnij
Copy link
Author

desnij commented Apr 12, 2022

@14by12 cool, thanks for the update. :)
I am going to close this since CentOS has added the package docker's script assumed was there.

I find it embarrassing for docker.com, every time someone says just type https://get.docker.com; Someone should have looked at this a little deeper than to just wait in silence for a Linux distro, but I guess that is open source for you :)

@desnij desnij closed this as completed Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests