alibaba / cloud-kernel

Cloud Kernel - an open-source Linux kernel originated by Alibaba Operating System Team
https://alibaba.github.io/cloud-kernel
Other
393 stars 95 forks source link

snap doesn't meet dependency requirements #12

Closed whao closed 4 years ago

whao commented 4 years ago

I was trying to install snapd on Alibaba Cloud Linux 2. And it seems that selinux-policy-base is too old in repo. I have yum update everything to the latest version.

[root@cn-hongkong-aliyun-cn-hongkong-1582695960 ~]# yum install snapd
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package snapd.x86_64 0:2.47.1-1.el7 will be installed
--> Processing Dependency: snap-confine(x86-64) = 2.47.1-1.el7 for package: snapd-2.47.1-1.el7.x86_64
--> Processing Dependency: snapd-selinux = 2.47.1-1.el7 for package: snapd-2.47.1-1.el7.x86_64
--> Processing Dependency: squashfs-tools for package: snapd-2.47.1-1.el7.x86_64
--> Processing Dependency: squashfuse for package: snapd-2.47.1-1.el7.x86_64
--> Running transaction check
---> Package snap-confine.x86_64 0:2.47.1-1.el7 will be installed
---> Package snapd-selinux.noarch 0:2.47.1-1.el7 will be installed
--> Processing Dependency: selinux-policy-base >= 3.13.1-268.el7 for package: snapd-selinux-2.47.1-1.el7.noarch
--> Processing Dependency: policycoreutils-python for package: snapd-selinux-2.47.1-1.el7.noarch
---> Package squashfs-tools.x86_64 0:4.3-0.21.gitaae0aff4.1.al7 will be installed
---> Package squashfuse.x86_64 0:0.1.102-1.el7 will be installed
--> Processing Dependency: squashfuse-libs(x86-64) = 0.1.102-1.el7 for package: squashfuse-0.1.102-1.el7.x86_64
--> Processing Dependency: libfuseprivate.so.0()(64bit) for package: squashfuse-0.1.102-1.el7.x86_64
--> Processing Dependency: libsquashfuse.so.0()(64bit) for package: squashfuse-0.1.102-1.el7.x86_64
--> Processing Dependency: libzstd.so.1()(64bit) for package: squashfuse-0.1.102-1.el7.x86_64
--> Running transaction check
---> Package libzstd.x86_64 0:1.4.5-3.el7 will be installed
---> Package policycoreutils-python.x86_64 0:2.5-34.1.al7 will be installed
--> Processing Dependency: setools-libs >= 3.3.8-4 for package: policycoreutils-python-2.5-34.1.al7.x86_64
--> Processing Dependency: libsemanage-python >= 2.5-14 for package: policycoreutils-python-2.5-34.1.al7.x86_64
--> Processing Dependency: audit-libs-python >= 2.1.3-4 for package: policycoreutils-python-2.5-34.1.al7.x86_64
--> Processing Dependency: python-IPy for package: policycoreutils-python-2.5-34.1.al7.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.4)(64bit) for package: policycoreutils-python-2.5-34.1.al7.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.2)(64bit) for package: policycoreutils-python-2.5-34.1.al7.x86_64
--> Processing Dependency: libcgroup for package: policycoreutils-python-2.5-34.1.al7.x86_64
--> Processing Dependency: libapol.so.4(VERS_4.0)(64bit) for package: policycoreutils-python-2.5-34.1.al7.x86_64
--> Processing Dependency: checkpolicy for package: policycoreutils-python-2.5-34.1.al7.x86_64
--> Processing Dependency: libqpol.so.1()(64bit) for package: policycoreutils-python-2.5-34.1.al7.x86_64
--> Processing Dependency: libapol.so.4()(64bit) for package: policycoreutils-python-2.5-34.1.al7.x86_64
---> Package snapd-selinux.noarch 0:2.47.1-1.el7 will be installed
--> Processing Dependency: selinux-policy-base >= 3.13.1-268.el7 for package: snapd-selinux-2.47.1-1.el7.noarch
---> Package squashfuse-libs.x86_64 0:0.1.102-1.el7 will be installed
--> Running transaction check
---> Package audit-libs-python.x86_64 0:2.8.5-4.1.al7 will be installed
---> Package checkpolicy.x86_64 0:2.5-8.1.al7 will be installed
---> Package libcgroup.x86_64 0:0.41-21.1.al7 will be installed
---> Package libsemanage-python.x86_64 0:2.5-14.1.al7 will be installed
---> Package python-IPy.noarch 0:0.75-6.1.al7 will be installed
---> Package setools-libs.x86_64 0:3.3.8-4.1.al7 will be installed
---> Package snapd-selinux.noarch 0:2.47.1-1.el7 will be installed
--> Processing Dependency: selinux-policy-base >= 3.13.1-268.el7 for package: snapd-selinux-2.47.1-1.el7.noarch
--> Finished Dependency Resolution
Error: Package: snapd-selinux-2.47.1-1.el7.noarch (epel)
           Requires: selinux-policy-base >= 3.13.1-268.el7
           Installed: selinux-policy-targeted-3.13.1-266.1.al7.1.noarch (@anaconda)
               selinux-policy-base = 3.13.1-266.1.al7.1
           Available: selinux-policy-minimum-3.13.1-229.1.al7.noarch (base)
               selinux-policy-base = 3.13.1-229.1.al7
           Available: selinux-policy-minimum-3.13.1-229.6.al7.noarch (updates)
               selinux-policy-base = 3.13.1-229.6.al7
           Available: selinux-policy-minimum-3.13.1-229.7.al7.9.noarch (updates)
               selinux-policy-base = 3.13.1-229.7.al7.9
           Available: selinux-policy-minimum-3.13.1-229.8.al7.12.noarch (updates)
               selinux-policy-base = 3.13.1-229.8.al7.12
           Available: selinux-policy-minimum-3.13.1-229.9.al7.15.noarch (updates)
               selinux-policy-base = 3.13.1-229.9.al7.15
           Available: selinux-policy-minimum-3.13.1-252.1.al7.1.noarch (updates)
               selinux-policy-base = 3.13.1-252.1.al7.1
           Available: selinux-policy-minimum-3.13.1-252.1.al7.6.noarch (updates)
               selinux-policy-base = 3.13.1-252.1.al7.6
           Available: selinux-policy-minimum-3.13.1-266.1.al7.noarch (updates)
               selinux-policy-base = 3.13.1-266.1.al7
           Available: selinux-policy-minimum-3.13.1-266.1.al7.1.noarch (updates)
               selinux-policy-base = 3.13.1-266.1.al7.1
           Available: selinux-policy-mls-3.13.1-229.1.al7.noarch (base)
               selinux-policy-base = 3.13.1-229.1.al7
           Available: selinux-policy-mls-3.13.1-229.6.al7.noarch (updates)
               selinux-policy-base = 3.13.1-229.6.al7
           Available: selinux-policy-mls-3.13.1-229.7.al7.9.noarch (updates)
               selinux-policy-base = 3.13.1-229.7.al7.9
           Available: selinux-policy-mls-3.13.1-229.8.al7.12.noarch (updates)
               selinux-policy-base = 3.13.1-229.8.al7.12
           Available: selinux-policy-mls-3.13.1-229.9.al7.15.noarch (updates)
               selinux-policy-base = 3.13.1-229.9.al7.15
           Available: selinux-policy-mls-3.13.1-252.1.al7.1.noarch (updates)
               selinux-policy-base = 3.13.1-252.1.al7.1
           Available: selinux-policy-mls-3.13.1-252.1.al7.6.noarch (updates)
               selinux-policy-base = 3.13.1-252.1.al7.6
           Available: selinux-policy-mls-3.13.1-266.1.al7.noarch (updates)
               selinux-policy-base = 3.13.1-266.1.al7
           Available: selinux-policy-mls-3.13.1-266.1.al7.1.noarch (updates)
               selinux-policy-base = 3.13.1-266.1.al7.1
           Available: selinux-policy-targeted-3.13.1-229.1.al7.noarch (base)
               selinux-policy-base = 3.13.1-229.1.al7
           Available: selinux-policy-targeted-3.13.1-229.6.al7.noarch (updates)
               selinux-policy-base = 3.13.1-229.6.al7
           Available: selinux-policy-targeted-3.13.1-229.7.al7.9.noarch (updates)
               selinux-policy-base = 3.13.1-229.7.al7.9
           Available: selinux-policy-targeted-3.13.1-229.8.al7.12.noarch (updates)
               selinux-policy-base = 3.13.1-229.8.al7.12
           Available: selinux-policy-targeted-3.13.1-229.9.al7.15.noarch (updates)
               selinux-policy-base = 3.13.1-229.9.al7.15
           Available: selinux-policy-targeted-3.13.1-252.1.al7.1.noarch (updates)
               selinux-policy-base = 3.13.1-252.1.al7.1
           Available: selinux-policy-targeted-3.13.1-252.1.al7.6.noarch (updates)
               selinux-policy-base = 3.13.1-252.1.al7.6
           Available: selinux-policy-targeted-3.13.1-266.1.al7.noarch (updates)
               selinux-policy-base = 3.13.1-266.1.al7
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

The OS info

[root@cn-hongkong-aliyun-cn-hongkong-1582695960 ~]# uname -a
Linux cn-hongkong-aliyun-cn-hongkong-1582695960.######.com 4.19.91-21.2.al7.x86_64 #1 SMP Fri Sep 18 11:39:58 CST 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@cn-hongkong-aliyun-cn-hongkong-1582695960 ~]# lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: AlibabaCloud(AliyunLinux)
Description:    Alibaba Cloud Linux (Aliyun Linux) release 2.1903 LTS (Hunting Beagle) 
Release:    2.1903
Codename:   HuntingBeagle

Any idea on this or I have do install selinux-policy-base manually?

Thanks!

casparant commented 4 years ago

Thanks for reporting this issue. seems latest snapd from epel requires the most recent version of selinux-policy, which is not included in Alibaba Cloud Linux 2 yum nor in CentOS7 yet. let's see how we can solve this....

geliwei commented 4 years ago

higher selinux-policy has been published in alinux repo

whao commented 4 years ago

higher selinux-policy has been published in alinux repo

@geliwei YES! Solved!

[root@cn-hongkong-aliyun-cn-hongkong-1582695960 ~]# yum install snapd
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package snapd.x86_64 0:2.47.1-1.el7 will be installed
--> Processing Dependency: snap-confine(x86-64) = 2.47.1-1.el7 for package: snapd-2.47.1-1.el7.x86_64
--> Processing Dependency: snapd-selinux = 2.47.1-1.el7 for package: snapd-2.47.1-1.el7.x86_64
--> Processing Dependency: squashfs-tools for package: snapd-2.47.1-1.el7.x86_64
--> Processing Dependency: squashfuse for package: snapd-2.47.1-1.el7.x86_64
--> Running transaction check
---> Package snap-confine.x86_64 0:2.47.1-1.el7 will be installed
---> Package snapd-selinux.noarch 0:2.47.1-1.el7 will be installed
---> Package squashfs-tools.x86_64 0:4.3-0.21.gitaae0aff4.1.al7 will be installed
---> Package squashfuse.x86_64 0:0.1.102-1.el7 will be installed
--> Processing Dependency: squashfuse-libs(x86-64) = 0.1.102-1.el7 for package: squashfuse-0.1.102-1.el7.x86_64
--> Processing Dependency: libfuseprivate.so.0()(64bit) for package: squashfuse-0.1.102-1.el7.x86_64
--> Processing Dependency: libsquashfuse.so.0()(64bit) for package: squashfuse-0.1.102-1.el7.x86_64
--> Processing Dependency: libzstd.so.1()(64bit) for package: squashfuse-0.1.102-1.el7.x86_64
--> Running transaction check
---> Package libzstd.x86_64 0:1.4.5-3.el7 will be installed
---> Package squashfuse-libs.x86_64 0:0.1.102-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==========================================================================================================================================================================================================
 Package                                            Arch                                      Version                                                       Repository                               Size
==========================================================================================================================================================================================================
Installing:
 snapd                                              x86_64                                    2.47.1-1.el7                                                  epel                                     15 M
Installing for dependencies:
 libzstd                                            x86_64                                    1.4.5-3.el7                                                   epel                                    331 k
 snap-confine                                       x86_64                                    2.47.1-1.el7                                                  epel                                    3.1 M
 snapd-selinux                                      noarch                                    2.47.1-1.el7                                                  epel                                    362 k
 squashfs-tools                                     x86_64                                    4.3-0.21.gitaae0aff4.1.al7                                    base                                    101 k
 squashfuse                                         x86_64                                    0.1.102-1.el7                                                 epel                                     18 k
 squashfuse-libs                                    x86_64                                    0.1.102-1.el7                                                 epel                                     24 k

Transaction Summary
==========================================================================================================================================================================================================
Install  1 Package (+6 Dependent packages)

Total download size: 19 M
Installed size: 53 M
Is this ok [y/d/N]: y
Downloading packages:
(1/7): libzstd-1.4.5-3.el7.x86_64.rpm                                                                                                                                              | 331 kB  00:00:00     
(2/7): snap-confine-2.47.1-1.el7.x86_64.rpm                                                                                                                                        | 3.1 MB  00:00:00     
(3/7): squashfs-tools-4.3-0.21.gitaae0aff4.1.al7.x86_64.rpm                                                                                                                        | 101 kB  00:00:00     
(4/7): snapd-selinux-2.47.1-1.el7.noarch.rpm                                                                                                                                       | 362 kB  00:00:00     
(5/7): squashfuse-0.1.102-1.el7.x86_64.rpm                                                                                                                                         |  18 kB  00:00:00     
(6/7): squashfuse-libs-0.1.102-1.el7.x86_64.rpm                                                                                                                                    |  24 kB  00:00:00     
(7/7): snapd-2.47.1-1.el7.x86_64.rpm                                                                                                                                               |  15 MB  00:00:00     
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                      20 MB/s |  19 MB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libzstd-1.4.5-3.el7.x86_64                                                                                                                                                             1/7 
  Installing : snapd-selinux-2.47.1-1.el7.noarch                                                                                                                                                      2/7 
  Installing : snap-confine-2.47.1-1.el7.x86_64                                                                                                                                                       3/7 
  Installing : squashfs-tools-4.3-0.21.gitaae0aff4.1.al7.x86_64                                                                                                                                       4/7 
  Installing : squashfuse-libs-0.1.102-1.el7.x86_64                                                                                                                                                   5/7 
  Installing : squashfuse-0.1.102-1.el7.x86_64                                                                                                                                                        6/7 
  Installing : snapd-2.47.1-1.el7.x86_64                                                                                                                                                              7/7 
  Verifying  : squashfuse-libs-0.1.102-1.el7.x86_64                                                                                                                                                   1/7 
  Verifying  : squashfs-tools-4.3-0.21.gitaae0aff4.1.al7.x86_64                                                                                                                                       2/7 
  Verifying  : snap-confine-2.47.1-1.el7.x86_64                                                                                                                                                       3/7 
  Verifying  : snapd-2.47.1-1.el7.x86_64                                                                                                                                                              4/7 
  Verifying  : snapd-selinux-2.47.1-1.el7.noarch                                                                                                                                                      5/7 
  Verifying  : libzstd-1.4.5-3.el7.x86_64                                                                                                                                                             6/7 
  Verifying  : squashfuse-0.1.102-1.el7.x86_64                                                                                                                                                        7/7 

Installed:
  snapd.x86_64 0:2.47.1-1.el7                                                                                                                                                                             

Dependency Installed:
  libzstd.x86_64 0:1.4.5-3.el7            snap-confine.x86_64 0:2.47.1-1.el7  snapd-selinux.noarch 0:2.47.1-1.el7  squashfs-tools.x86_64 0:4.3-0.21.gitaae0aff4.1.al7  squashfuse.x86_64 0:0.1.102-1.el7 
  squashfuse-libs.x86_64 0:0.1.102-1.el7 

Complete!