在使用docker容器yum安裝時出現類似的錯誤:
Transaction check error:
file /usr/lib64/libsystemd-daemon.so.0 from install of systemd-libs-219-19.el7.x86_64 conflicts with file from package systemd-container-libs-208.20-6.el7.centos.x86_64
file /usr/lib64/libsystemd-id128.so.0 from install of systemd-libs-219-19.el7.x86_64 conflicts with file from package systemd-container-libs-208.20-6.el7.centos.x86_64
file /usr/lib64/libsystemd-journal.so.0 from install of systemd-libs-219-19.el7.x86_64 conflicts with file from package systemd-container-libs-208.20-6.el7.centos.x86_64
file /usr/lib64/libsystemd-login.so.0 from install of systemd-libs-219-19.el7.x86_64 conflicts with file from package systemd-container-libs-208.20-6.el7.centos.x86_64
file /usr/lib64/libudev.so.1 from install of systemd-libs-219-19.el7.x86_64 conflicts with file from package systemd-container-libs-208.20-6.el7.centos.x86_64
file /usr/lib64/security/pam_systemd.so from install of systemd-libs-219-19.el7.x86_64 conflicts with file from package systemd-container-libs-208.20-6.el7.centos.x86_64
這是由于從systemd-容器*包實際systemd的過渡。出于某種原因,上遊包不過時或發生沖突,是以你會在安裝包時出錯。 解決辦法是擷取最新的centos鏡像。或者執行指令:
yum install -y libsystemd-daemon.so.0 libsystemd-id128.so.0 libsystemd-journal.so.0 libsystemd-login.so.0 libudev.so.1 systemd-container-libs
隻能是祝你好運。
另外就是docker容器裡面啟動服務時出現:
Failed to get D-Bus connection: Operation not permitted
首先恭喜你使用centos7鏡像,然後就是不幸告訴你這個問題是個BUG 将在centos7.2解決。
目前能做的就是使用其他的方式啟動。或者看我的另一篇微網誌:http://welcomeweb.blog.51cto.com/10487763/1735251
Currently, systemd in CentOS 7 has been removed and replaced with a fakesystemd package for dependency resolution. This is due to systemd requiring the CAP_SYS_ADMIN capability, as well as being able to read the host's cgroups. If you wish to replace the fakesystemd package and use systemd normally, please follow the steps below.
本文轉自 憬薇 51CTO部落格,原文連結:http://blog.51cto.com/welcomeweb/1732589