zoukankan      html  css  js  c++  java
  • Linux 常规报错

    2020-06-06

    • 错误描述:tar: Cannot connect to nginx-2019-06-02-info.0.log-2019-06-06_06: resolve failed
    [root@backup back_log]# tar xf nginx-2019-06-02-info.0.log-2019-06-06_06:00:01.tar.gz 
    tar: Cannot connect to nginx-2019-06-02-info.0.log-2019-06-06_06: resolve failed
    
    • 原因及解决办法:由于压缩文件名字里面有":",所以会被识别成一个地址,此时解压缩需要使用--force-loca的参数来忽略冒号。
    [root@backup back_log]# tar xf nginx-2019-06-02-info.0.log-2019-06-06_06:00:01.tar.gz  --force-local
    

    2021-04-19

    • 错误描述:mount: /dev/sdb 写保护,将以只读方式挂载
      0 11:13:25 root@dolphindb1,172.16.1.11:~ # mount /dev/sdb /data
    mount: /dev/sdb 写保护,将以只读方式挂载
    mount: 未知的文件系统类型“(null)”
    
    • 原因及解决办法:应该是挂在的磁盘分区不对,如果磁盘分过区,则需要使用分区编号进行挂载。
      0 11:20:12 root@dolphindb1,172.16.1.11:~ # ls /dev/sd*
    /dev/sda  /dev/sda1  /dev/sda2  /dev/sda3  /dev/sdb  /dev/sdb1  /dev/sdc  /dev/sdc1
      0 11:13:25 root@dolphindb1,172.16.1.11:~ # mount /dev/sdb1 /data
    

    2021-06-05

    • 错误描述:yum update提示“One of the configured repositories failed”
    [root@node17 build]# yum update 
    已加载插件:fastestmirror, langpacks, nvidia
    Loading mirror speeds from cached hostfile
    Could not retrieve mirrorlist http://mirrorlist.centos.org?arch=x86_64&release=7&repo=sclo-rh error was
    14: curl#7 - "Failed to connect to 2604:1580:fe02:2::10: 网络不可达"
    
    
     One of the configured repositories failed (未知),
     and yum doesn't have enough cached data to continue. At this point the only
     safe thing yum can do is fail. There are a few ways to work "fix" this:
    
         1. Contact the upstream for the repository and get them to fix the problem.
    
         2. Reconfigure the baseurl/etc. for the repository, to point to a working
            upstream. This is most often useful if you are using a newer
            distribution release than is supported by the repository (and the
            packages for the previous distribution release still work).
    
         3. Run the command with the repository temporarily disabled
                yum --disablerepo=<repoid> ...
    
         4. Disable the repository permanently, so yum won't use it by default. Yum
            will then just ignore the repository until you permanently enable it
            again or use --enablerepo for temporary usage:
    
                yum-config-manager --disable <repoid>
            or
                subscription-manager repos --disable=<repoid>
    
         5. Configure the failing repository to be skipped, if it is unavailable.
            Note that yum will try to contact the repo. when it runs most commands,
            so will have to try and fail each time (and thus. yum will be be much
            slower). If it is a very temporary problem though, this is often a nice
            compromise:
    
                yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
    
    Cannot find a valid baseurl for repo: centos-sclo-rh/x86_64
    
    • 原因及解决办法:报错的结尾提示说有个源是无效的,那么我们尝试先把这个源挪走再试。
    [root@node17 build]# mv /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo{,.bak}
    [root@node17 build]# yum update      # 恢复正常
    已加载插件:fastestmirror, langpacks, nvidia
    Loading mirror speeds from cached hostfile
    epel/x86_64/metalink                                                                                                                                                                                                                  | 4.3 kB  00:00:00
    


    写作不易,转载请注明出处,谢谢~~

  • 相关阅读:
    解决mybatis xml文件代码提示
    SVN cleanup failed–previous operation has not finished; run cleanup if it was interrupted
    有36辆自动赛车和6条跑道,没有计时器的前提下,最少用几次比赛可以筛选出最快的三辆赛车?
    mybatis如何在控制台打印执行的sql语句
    Ionic2如何下拉刷新和上拉加载
    Ionic 如何把左上角的按钮去掉?
    Ionic1与Ionic2
    java的四种引用,强弱软虚
    equals变量在前面或者在后面有什么区别吗?这是一个坑点
    Java基础—复用类
  • 原文地址:https://www.cnblogs.com/ccbloom/p/14678475.html
Copyright © 2011-2022 走看看