zoukankan      html  css  js  c++  java
  • docker 运行报错:/bin/bash: error while loading shared libraries: libtinfo.so.6: cannot open shared object file: Permission denied

    现象:启动docker容器时,启动不成功。显示没有权限

    报错如下:

    原因:共享库没有权限导致,如果是普通用户,则尝试切换到root用户尝试,如果是root用户还是提示这个错误,就要检查防火墙和SElinux

    [root@localhost opt]# systemctl status firewalld
    ● firewalld.service - firewalld - dynamic firewall daemon
       Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
       Active: inactive (dead)
         Docs: man:firewalld(1)
    [root@localhost opt]# getenforce 
    Enforcing
    

      

    由此可知是SEliunx没有关闭导致容器启动失败,临时开发SELinux

    [root@localhost opt]# setenforce 0
    [root@localhost opt]# docker run -it centos /bin/bash
    [root@eff214edebe5 /]#     #表明成功进入到容器中
    

      

    启动成功。建议永久关闭

    [root@localhost ~]# vi /etc/selinux/config
    ....
    #     permissive - SELinux prints warnings instead of enforcing.
    #     disabled - No SELinux policy is loaded.
    SELINUX=disabled    #改成disabled
    # SELINUXTYPE= can take one of three two values:
    #     targeted - Targeted processes are protected,
    ....
    

      

    修改后需重启服务器。

    原文:https://www.cnblogs.com/wangzy-tongq/p/12797536.html

  • 相关阅读:
    推送消息为什么使用RocketMQ,而不使用Kafka?
    com.google.common.collect.Lists.addAll()空指针原因分析
    AQS原理
    ReentrantLock-加锁
    ReentrantLock-自旋
    Reentrantlock-的核心内容
    java中,BigDecimal的add方法避坑指南
    Reentrantlock-实现原理
    Reentrantlock-适用场景
    JAVA foreach和普通for循环是否需要判断为null
  • 原文地址:https://www.cnblogs.com/sucretan2010/p/14106251.html
Copyright © 2011-2022 走看看