• rpm命令如何打印调试信息?


    问题描述

      今天在做rpm相关操作的时候,发现报错,并且还不知道如何入手来解决问题,就左查右查的问题还是没有解决,后来就想,rpm能否打印debug信息,然后也百度了,也没有找到,后来想我为啥不看看rpm的帮助文档呢,就看了下,然后发现通过 -vv参数就能实现这个功能。

    示例

      1 [root@testvm03 log]# rpm -e -vv mysql-server-5.1.73-8.el6_8.x86_64   #备注:中划线后面是两个v,不是W
      2 D: loading keyring from pubkeys in /var/lib/rpm/pubkeys/*.key
      3 D: couldn't find any keys in /var/lib/rpm/pubkeys/*.key
      4 D: loading keyring from rpmdb
      5 D: opening  db environment /var/lib/rpm cdb:mpool:joinenv
      6 D: opening  db index       /var/lib/rpm/Packages rdonly mode=0x0
      7 D: locked   db index       /var/lib/rpm/Packages
      8 D: opening  db index       /var/lib/rpm/Name rdonly mode=0x0
      9 D:  read h#     323 Header sanity check: OK
     10 D: added key gpg-pubkey-c105b9de-4e0fd3a3 to keyring
     11 D: Using legacy gpg-pubkey(s) from rpmdb
     12 D:  read h#     350 Header V3 RSA/SHA1 Signature, key ID c105b9de: OK
     13 D: ========== --- mysql-server-5.1.73-8.el6_8 x86_64/linux 0x2
     14 D: opening  db index       /var/lib/rpm/Requirename rdonly mode=0x0
     15 D: ========== recording tsort relations
     16 D:  Requires: ha_archive.so.0()(64bit)                      YES (added provide)
     17 D:  Requires: ha_blackhole.so.0()(64bit)                    YES (added provide)
     18 D:  Requires: ha_example.so.0()(64bit)                      YES (added provide)
     19 D:  Requires: ha_federated.so.0()(64bit)                    YES (added provide)
     20 D:  Requires: ha_innodb_plugin.so.0()(64bit)                YES (added provide)
     21 D: ========== tsorting packages (order, #predecessors, #succesors, tree, depth)
     22 D:     0    0    0    0    1   -mysql-server-5.1.73-8.el6_8.x86_64
     23 D: erasing packages
     24 D: closed   db index       /var/lib/rpm/Requirename
     25 D: closed   db index       /var/lib/rpm/Name
     26 D: closed   db index       /var/lib/rpm/Packages
     27 D: closed   db environment /var/lib/rpm
     28 D: opening  db environment /var/lib/rpm cdb:mpool:joinenv
     29 D: opening  db index       /var/lib/rpm/Packages create mode=0x42
     30 D: sanity checking 1 elements
     31 D: running pre-transaction scripts
     32 D: computing 99 file fingerprints
     33 D: computing file dispositions
     34 D: opening  db index       /var/lib/rpm/Basenames create mode=0x42
     35 D: 0x0000fd00     4096       799876       374295 /
     36 D: ========== +++ mysql-server-5.1.73-8.el6_8 x86_64-linux 0x2
     37 D:  read h#     350 Header V3 RSA/SHA1 Signature, key ID c105b9de: OK
     38 D:     erase: mysql-server-5.1.73-8.el6_8 has 99 files, test = 0
     39 D: opening  db index       /var/lib/rpm/Name create mode=0x42
     40 D: opening  db index       /var/lib/rpm/Triggername create mode=0x42
     41 D:     erase: %preun(mysql-server-5.1.73-8.el6_8.x86_64) scriptlet start
     42 D:     erase: %preun(mysql-server-5.1.73-8.el6_8.x86_64)    execv(/bin/sh) pid 2114
     43 + '[' 0 = 0 ']'
     44 + /sbin/service mysqld stop
     45 + /sbin/chkconfig --del mysqld
     46 D:     erase: waitpid(2114) rc 2114 status 0 secs 1.078
     47 D: fini      040755  2 ( 600, 600)      4096 /var/run/mysqld 
     48 D: fini      100640  1 ( 600, 600)      1672 /var/log/mysqld.log backup
     49 warning: /var/log/mysqld.log saved as /var/log/mysqld.log.rpmsave
     50 D: fini      040755  4 ( 600, 600)      4096 /var/lib/mysql 
     51 D:    erase rmdir of /var/lib/mysql failed: Directory not empty
     52 D: fini      100644  1 (   0,   0)     10376 /usr/share/mysql/mysql_test_data_timezone.sql 
     53 D: fini      100644  1 (   0,   0)      2855 /usr/share/mysql/mysql_system_tables_data.sql 
     54 D: fini      100644  1 (   0,   0)     17285 /usr/share/mysql/mysql_system_tables.sql 
     55 D: fini      100644  1 (   0,   0)     45560 /usr/share/mysql/mysql_fix_privilege_tables.sql 
     56 D: fini      100644  1 (   0,   0)      2441 /usr/share/mysql/my-small.cnf 
     57 D: fini      100644  1 (   0,   0)      4673 /usr/share/mysql/my-medium.cnf 
     58 D: fini      100644  1 (   0,   0)      4662 /usr/share/mysql/my-large.cnf 
     59 D: fini      100644  1 (   0,   0)     19751 /usr/share/mysql/my-innodb-heavy-4G.cnf 
     60 D: fini      100644  1 (   0,   0)      4688 /usr/share/mysql/my-huge.cnf 
     61 D: fini      100644  1 (   0,   0)    641349 /usr/share/mysql/fill_help_tables.sql 
     62 D: fini      100644  1 (   0,   0)    416238 /usr/share/mysql/errmsg.txt 
     63 D: fini      100644  1 (   0,   0)      1626 /usr/share/mysql/config.small.ini 
     64 D: fini      100644  1 (   0,   0)      2382 /usr/share/mysql/config.medium.ini 
     65 D: fini      100644  1 (   0,   0)      4528 /usr/share/mysql/config.huge.ini 
     66 D: fini      100644  1 (   0,   0)     12527 /usr/share/man/man8/mysqlmanager.8.gz 
     67 D: fini      100644  1 (   0,   0)      1691 /usr/share/man/man8/mysqld.8.gz 
     68 D: fini      100644  1 (   0,   0)      1448 /usr/share/man/man1/resolveip.1.gz 
     69 D: fini      100644  1 (   0,   0)      1650 /usr/share/man/man1/resolve_stack_dump.1.gz 
     70 D: fini      100644  1 (   0,   0)      1859 /usr/share/man/man1/replace.1.gz 
     71 D: fini      100644  1 (   0,   0)      1838 /usr/share/man/man1/perror.1.gz 
     72 D: fini      100644  1 (   0,   0)      4970 /usr/share/man/man1/mysqltest.1.gz 
     73 D: fini      100644  1 (   0,   0)       416 /usr/share/man/man1/mysqlman.1.gz 
     74 D: fini      100644  1 (   0,   0)      4548 /usr/share/man/man1/mysqlimport.1.gz 
     75 D: fini      100644  1 (   0,   0)      3187 /usr/share/man/man1/mysqlhotcopy.1.gz 
     76 D: fini      100644  1 (   0,   0)      2298 /usr/share/man/man1/mysqldumpslow.1.gz 
     77 D: fini      100644  1 (   0,   0)      5381 /usr/share/man/man1/mysqld_safe.1.gz 
     78 D: fini      100644  1 (   0,   0)      5592 /usr/share/man/man1/mysqld_multi.1.gz 
     79 D: fini      100644  1 (   0,   0)      5695 /usr/share/man/man1/mysqlcheck.1.gz 
     80 D: fini      100644  1 (   0,   0)      1609 /usr/share/man/man1/mysqlbug.1.gz 
     81 D: fini      100644  1 (   0,   0)     12134 /usr/share/man/man1/mysqlbinlog.1.gz 
     82 D: fini      100644  1 (   0,   0)      1654 /usr/share/man/man1/mysql_zap.1.gz 
     83 D: fini      100644  1 (   0,   0)      3797 /usr/share/man/man1/mysql_upgrade.1.gz 
     84 D: fini      100644  1 (   0,   0)      1833 /usr/share/man/man1/mysql_tzinfo_to_sql.1.gz 
     85 D: fini      100644  1 (   0,   0)      1997 /usr/share/man/man1/mysql_setpermission.1.gz 
     86 D: fini      100644  1 (   0,   0)      1543 /usr/share/man/man1/mysql_secure_installation.1.gz 
     87 D: fini      100644  1 (   0,   0)      2752 /usr/share/man/man1/mysql_install_db.1.gz 
     88 D: fini      100644  1 (   0,   0)      2165 /usr/share/man/man1/mysql_fix_privilege_tables.1.gz 
     89 D: fini      100644  1 (   0,   0)      1426 /usr/share/man/man1/mysql_fix_extensions.1.gz 
     90 D: fini      100644  1 (   0,   0)      2035 /usr/share/man/man1/mysql_convert_table_format.1.gz 
     91 D: fini      100644  1 (   0,   0)      2181 /usr/share/man/man1/mysql.server.1.gz 
     92 D: fini      100644  1 (   0,   0)      5443 /usr/share/man/man1/myisampack.1.gz 
     93 D: fini      100644  1 (   0,   0)      1835 /usr/share/man/man1/myisamlog.1.gz 
     94 D: fini      100644  1 (   0,   0)     13582 /usr/share/man/man1/myisamchk.1.gz 
     95 D: fini      100644  1 (   0,   0)      2286 /usr/share/man/man1/myisam_ftdump.1.gz 
     96 D: fini      100644  1 (   0,   0)      1508 /usr/share/man/man1/msql2mysql.1.gz 
     97 D: fini      100644  1 (   0,   0)      1850 /usr/share/man/man1/innochecksum.1.gz 
     98 D: fini      100644  1 (   0,   0)      2441 /usr/share/doc/mysql-server-5.1.73/my-small.cnf 
     99 D: fini      100644  1 (   0,   0)      4673 /usr/share/doc/mysql-server-5.1.73/my-medium.cnf 
    100 D: fini      100644  1 (   0,   0)      4662 /usr/share/doc/mysql-server-5.1.73/my-large.cnf 
    101 D: fini      100644  1 (   0,   0)     19751 /usr/share/doc/mysql-server-5.1.73/my-innodb-heavy-4G.cnf 
    102 D: fini      100644  1 (   0,   0)      4688 /usr/share/doc/mysql-server-5.1.73/my-huge.cnf 
    103 D: fini      040755  2 (   0,   0)      4096 /usr/share/doc/mysql-server-5.1.73 
    104 D: fini      100755  1 (   0,   0)   1569176 /usr/libexec/mysqlmanager 
    105 D: fini      100755  1 (   0,   0)   7590416 /usr/libexec/mysqld 
    106 D: fini      100755  1 (   0,   0)   1259136 /usr/lib64/mysql/plugin/ha_innodb_plugin.so.0.0.0 
    107 D: fini      120777  1 (   0,   0)        25 /usr/lib64/mysql/plugin/ha_innodb_plugin.so.0 
    108 D: fini      120777  1 (   0,   0)        25 /usr/lib64/mysql/plugin/ha_innodb_plugin.so 
    109 D: fini      100755  1 (   0,   0)     58064 /usr/lib64/mysql/plugin/ha_federated.so.0.0.0 
    110 D: fini      120777  1 (   0,   0)        21 /usr/lib64/mysql/plugin/ha_federated.so.0 
    111 D: fini      120777  1 (   0,   0)        21 /usr/lib64/mysql/plugin/ha_federated.so 
    112 D: fini      100755  1 (   0,   0)     33168 /usr/lib64/mysql/plugin/ha_example.so.0.0.0 
    113 D: fini      120777  1 (   0,   0)        19 /usr/lib64/mysql/plugin/ha_example.so.0 
    114 D: fini      120777  1 (   0,   0)        19 /usr/lib64/mysql/plugin/ha_example.so 
    115 D: fini      100755  1 (   0,   0)     30288 /usr/lib64/mysql/plugin/ha_blackhole.so.0.0.0 
    116 D: fini      120777  1 (   0,   0)        21 /usr/lib64/mysql/plugin/ha_blackhole.so.0 
    117 D: fini      120777  1 (   0,   0)        21 /usr/lib64/mysql/plugin/ha_blackhole.so 
    118 D: fini      100755  1 (   0,   0)     54048 /usr/lib64/mysql/plugin/ha_archive.so.0.0.0 
    119 D: fini      120777  1 (   0,   0)        19 /usr/lib64/mysql/plugin/ha_archive.so.0 
    120 D: fini      120777  1 (   0,   0)        19 /usr/lib64/mysql/plugin/ha_archive.so 
    121 D: fini      040755  2 (   0,   0)      4096 /usr/lib64/mysql/plugin 
    122 D: fini      100755  1 (   0,   0)   1365648 /usr/bin/resolveip 
    123 D: fini      100755  1 (   0,   0)   1369792 /usr/bin/resolve_stack_dump 
    124 D: fini      100755  1 (   0,   0)   1369712 /usr/bin/replace 
    125 D: fini      100755  1 (   0,   0)   1370544 /usr/bin/perror 
    126 D: fini      100755  1 (   0,   0)    187672 /usr/bin/mysqltest 
    127 D: fini      100755  1 (   0,   0)     32477 /usr/bin/mysqlhotcopy 
    128 D: fini      100755  1 (   0,   0)      7402 /usr/bin/mysqldumpslow 
    129 D: fini      100755  1 (   0,   0)     18204 /usr/bin/mysqld_safe 
    130 D: fini      100755  1 (   0,   0)     24495 /usr/bin/mysqld_multi 
    131 D: fini      100755  1 (   0,   0)      4808 /usr/bin/mysqlbug 
    132 D: fini      100755  1 (   0,   0)      3888 /usr/bin/mysql_zap 
    133 D: fini      100755  1 (   0,   0)     68176 /usr/bin/mysql_upgrade 
    134 D: fini      100755  1 (   0,   0)   1357920 /usr/bin/mysql_tzinfo_to_sql 
    135 D: fini      100755  1 (   0,   0)     17473 /usr/bin/mysql_setpermission 
    136 D: fini      100755  1 (   0,   0)      8198 /usr/bin/mysql_secure_installation 
    137 D: fini      100755  1 (   0,   0)     14646 /usr/bin/mysql_install_db 
    138 D: fini      100755  1 (   0,   0)      5834 /usr/bin/mysql_fix_privilege_tables 
    139 D: fini      100755  1 (   0,   0)      1261 /usr/bin/mysql_fix_extensions 
    140 D: fini      100755  1 (   0,   0)      4245 /usr/bin/mysql_convert_table_format 
    141 D: fini      100755  1 (   0,   0)   1671864 /usr/bin/myisampack 
    142 D: fini      100755  1 (   0,   0)   1639184 /usr/bin/myisamlog 
    143 D: fini      100755  1 (   0,   0)   1756720 /usr/bin/myisamchk 
    144 D: fini      100755  1 (   0,   0)   1642392 /usr/bin/myisam_ftdump 
    145 D: fini      100755  1 (   0,   0)     10024 /usr/bin/innochecksum 
    146 D: fini      100755  1 (   0,   0)      7026 /etc/rc.d/init.d/mysqld 
    147 D: fini      100644  1 (   0,   0)       871 /etc/logrotate.d/mysqld 
    148 D:     erase: %postun(mysql-server-5.1.73-8.el6_8.x86_64) scriptlet start
    149 D:     erase: %postun(mysql-server-5.1.73-8.el6_8.x86_64)    execv(/bin/sh) pid 2155
    150 + '[' 0 -ge 1 ']'
    151 D:     erase: waitpid(2155) rc 2155 status 0 secs 0.002
    152 D:   --- h#     350 mysql-server-5.1.73-8.el6_8.x86_64
    153 D: removing "mysql-server" from Name index.
    154 D: removing 99 entries from Basenames index.
    155 D: opening  db index       /var/lib/rpm/Group create mode=0x42
    156 D: removing "Applications/Databases" from Group index.
    157 D: opening  db index       /var/lib/rpm/Requirename create mode=0x42
    158 D: removing 68 entries from Requirename index.
    159 D: opening  db index       /var/lib/rpm/Providename create mode=0x42
    160 D: removing 8 entries from Providename index.
    161 D: opening  db index       /var/lib/rpm/Conflictname create mode=0x42
    162 D: removing 1 entries from Conflictname index.
    163 D: opening  db index       /var/lib/rpm/Dirnames create mode=0x42
    164 D: removing 14 entries from Dirnames index.
    165 D: opening  db index       /var/lib/rpm/Requireversion create mode=0x42
    166 D: removing 68 entries from Requireversion index.
    167 D: opening  db index       /var/lib/rpm/Provideversion create mode=0x42
    168 D: removing 8 entries from Provideversion index.
    169 D: opening  db index       /var/lib/rpm/Installtid create mode=0x42
    170 D: removing 1 entries from Installtid index.
    171 D: opening  db index       /var/lib/rpm/Sigmd5 create mode=0x42
    172 D: removing 1 entries from Sigmd5 index.
    173 D: opening  db index       /var/lib/rpm/Sha1header create mode=0x42
    174 D: removing "216aec29bd69c731019b4def5cf20d01f47cd1e0" from Sha1header index.
    175 D: opening  db index       /var/lib/rpm/Filedigests create mode=0x42
    176 D: removing 99 entries from Filedigests index.
    177 D: running post-transaction scripts
    178 D: closed   db index       /var/lib/rpm/Filedigests
    179 D: closed   db index       /var/lib/rpm/Sha1header
    180 D: closed   db index       /var/lib/rpm/Sigmd5
    181 D: closed   db index       /var/lib/rpm/Installtid
    182 D: closed   db index       /var/lib/rpm/Provideversion
    183 D: closed   db index       /var/lib/rpm/Requireversion
    184 D: closed   db index       /var/lib/rpm/Dirnames
    185 D: closed   db index       /var/lib/rpm/Triggername
    186 D: closed   db index       /var/lib/rpm/Conflictname
    187 D: closed   db index       /var/lib/rpm/Providename
    188 D: closed   db index       /var/lib/rpm/Requirename
    189 D: closed   db index       /var/lib/rpm/Group
    190 D: closed   db index       /var/lib/rpm/Basenames
    191 D: closed   db index       /var/lib/rpm/Name
    192 D: closed   db index       /var/lib/rpm/Packages
    193 D: closed   db environment /var/lib/rpm

     备注:这样,就能在出现执行命令报错的时候,将调试信息打印出来了,知道执行该命令时,都做了些什么事情。

    文档创建时间:2019年3月8日15:08:18

  • 相关阅读:
    quick-cocos2d-x + Lua 开发
    设置 Quick-Cocos2d-x 在 Windows 下的编译环境
    luaIDE选择
    接管radiobutton onclick 事件
    AlphaControls的使用方法
    Delphi程序调用C#.Net编译的DLL并打开窗体(详解)
    delphi 正则表达式
    Windows server 2003 伪静态配置方法
    windows 2003 iis php
    Linux Shell系列教程之(十一)Shell while循环
  • 原文地址:https://www.cnblogs.com/chuanzhang053/p/10495978.html
Copyright © 2020-2023  润新知