• Bash升级遇到的错误总结


    情况一、

    昨天bash漏洞放出,补丁也更新到yum源。百八十台服务器跑个yum –y update bash。有一台机器出了问题,登录检查~

    登录服务器,敲命令

    yum update bash

    返回如下:

       1:  [root@localhost ~]# yum update bash
       2:  Loaded plugins: fastestmirror
       3:  Existing lock /var/run/yum.pid: another copy is running as pid 17178.
       4:  Another app is currently holding the yum lock; waiting for it to exit...
       5:    The other application is: java
       6:      Memory : 1.2 G RSS (8.0 GB VSZ)
       7:      Started: Fri Sep 26 10:45:42 2014 - 09:15 ago
       8:      State  : Sleeping, pid: 17178
       9:  Another app is currently holding the yum lock; waiting for it to exit...
      10:    The other application is: java
      11:      Memory : 1.2 G RSS (8.1 GB VSZ)
      12:      Started: Fri Sep 26 10:45:42 2014 - 09:17 ago
      13:      State  : Sleeping, pid: 17178
      14:  Another app is currently holding the yum lock; waiting for it to exit...
      15:    The other application is: java
      16:      Memory : 1.2 G RSS (8.2 GB VSZ)
      17:      Started: Fri Sep 26 10:45:42 2014 - 09:19 ago
      18:      State  : Sleeping, pid: 17178
      19:   
      20:   
      21:  Exiting on user cancel.

    赶脚怪异,根本没有进程。杀掉重头来

       1:  [root@localhost ~]# ps -ef|grep yum
       2:  root     19434 19377  0 10:55 pts/0    00:00:00 grep yum
       3:  [root@localhost ~]# rm /var/run/yum.pid
       4:  rm: remove regular file `/var/run/yum.pid'? y
       5:  [root@localhost ~]# yum update bash
       6:  Loaded plugins: fastestmirror
       7:  Loading mirror speeds from cached hostfile
       8:  addons                                                                                              | 1.9 kB     00:00
       9:  base                                                                                                | 1.1 kB     00:00
      10:  Segmentation fault

    ?_? segmentation fault又是啥玩意

    搜了一下可能与zlib相关?经确认我的机器没有zlib相关的问题,不过ld.so.conf中的配置有些异样(与其它机器有异)

    /etc/ld.so.conf中添加了一行 “/usr/local/lib”

    把这行配置取消,确认应用无误~,再来看看yum

       1:  [root@localhost ~]# yum makecache
       2:  Loaded plugins: fastestmirror
       3:  Loading mirror speeds from cached hostfile
       4:  addons                                                                                              | 1.9 kB     00:00
       5:  base                                                                                                | 1.1 kB     00:00
       6:  extras                                                                                              | 2.1 kB     00:00
       7:  updates                                                                                             | 1.9 kB     00:00
       8:  base                                                                                                             3662/3662
       9:  base                                                                                                             3662/3662
      10:  base                                                                                                             3662/3662
      11:  Metadata Cache Created

    搞定……

    情况二、

    环境:

    OS:centos6.2 x86_64 minimal

    bash:bash.x86_64 0:4.1.2-8.el6.centos

    升级时按往常 yum update bash,得到提示

       1:  ---> Package bash.x86_64 0:4.1.2-8.el6.centos will be updated
       2:  ---> Package bash.x86_64 0:4.1.2-15.el6_5.2 will be an update

    OK,继续后提示

       1:  Error unpacking rpm package bash-4.1.2-15.el6_5.2.x86_64
       2:  error: unpacking of archive failed on file /bin/bash;5436015c: cpio: open
       3:  bash-4.1.2-8.el6.centos.x86_64 was supposed to be removed but is not!

    头大了~马上检查一下磁盘和存储是否有问题,结果问题来了

       1:  [root@localhost zhangwei]# touch 123
       2:  touch: setting times of `123': No such file or directory
       3:  ......
       4:  [root@localhost zhangwei]# mkdir 123
       5:  mkdir: cannot create directory `123': Invalid argument
       6:  ......
       7:  [root@localhost ~]# date >now
       8:  -bash: now: Invalid argument
       9:  ......

    首先确认的是服务器环境与文件未做任何修改,然后开搜

    google了一圈没发现问题,但是看到提示中都存在着一下关键字

    1、bash

    2、argument

    最后重启治百病,再yum update成功……

  • 相关阅读:
    尝试用博客园写个人日记
    db4o能代替Hibernate吗?
    RSS是否能支持携带扩展的权重信息呢?
    log4view可以更清楚地看log文件,不知道咋用
    tafiti.com体验微软的silverlight
    推荐两个插件DPack, Resharper
    用美味书签的标签实现类似nextlib的知识管理
    进程通讯的多种方式
    多维角度聊聊结对编程
    在Windows下编译和.NET运行MemCached
  • 原文地址:https://www.cnblogs.com/tutuye/p/3994464.html
Copyright © 2020-2023  润新知