在CentOs 5 rpm命令在我的Linux机器中…
[root@manage glib]# rpm -i libgcc-4.1.1-52.el5.i386.rpm [root@manage glib]# ps -efww | grep libgcc root 2020 32168 0 13:50 pts/0 00:00:00 grep libgcc root 14254 2974 0 13:09 pts/1 00:00:00 rpm -i libgcc-4.1.1-52.el5.i386.rpm
[root @ manage glib]#[root @ manage glib]#
[root@manage glib]# strace -p 14254 Process 14254 attached - interrupt to quit select(0, NULL, NULL, NULL, {0, 643179}) = 0 (Timeout) select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout) select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)
下面是strace
:
read(4, "\0\0\0\0\1\0\0\0\0\0\0\0a\25\6\0\7\0\0\0\0\20\0\0\0\10\0\0\0\0\0\0"..., 256) = 256 close(4) = 0 open("/var/lib/rpm/Packages", O_RDONLY|O_LARGEFILE) = 4 fcntl(4, F_SETFD, FD_CLOEXEC) = 0 fstat64(4, {st_mode=S_IFREG|0644, st_size=5582848, ...}) = 0 brk(0x821e000) = 0x821e000 select(0, NULL, NULL, NULL, {0, 1000}) = 0 (Timeout) select(0, NULL, NULL, NULL, {0, 2000}) = 0 (Timeout) select(0, NULL, NULL, NULL, {0, 4000}) = 0 (Timeout)
停止安装命令并重build你的rpm数据库。
你应该能够:
rm /var/lib/rpm/__db*
然后:
rpm --rebuilddb
然后再次尝试安装。
我有一个nfs挂载问题。 rpm擦除被挂起。 我无法取消(Ctrl-C)rpm过程。 没有理由为什么rpm应该访问这个挂载点。
df
命令也挂了。 比较mount
和df
输出。 DF卡死了是一个问题。 两个坐骑对我来说是一个问题。
umount /badmount
不起作用“umount.nfs:/ badmount:device is busy”。 umount --force -vvv /badmounts
摆脱了坏挂载(远程机器被closures)。 然后kill <my rpm process>
。 rm /var/lib/rpm/__db* && rpm --rebuilddb
。 从此再次在rpm上工作。
rpm -vvv
是有用的,并让我认为坐骑是一个问题。 在打印“挂载文件系统”后挂起
$ rpm -e --noscripts -vvv PACKAGE D: loading keyring from pubkeys in /var/lib/rpm/pubkeys/*.key D: couldn't find any keys in /var/lib/rpm/pubkeys/*.key D: loading keyring from rpmdb D: opening db environment /var/lib/rpm/Packages cdb:mpool:joinenv D: opening db index /var/lib/rpm/Packages rdonly mode=0x0 D: locked db index /var/lib/rpm/Packages D: opening db index /var/lib/rpm/Name rdonly mode=0x0 D: read h# 1489 Header sanity check: OK D: added key gpg-pubkey-57bbccba-4a6f97af to keyring D: Using legacy gpg-pubkey(s) from rpmdb D: read h# 912 Header SHA1 digest: OK (9fda42f8af7a801b81d14291987d1052d2c17c53) D: ========== --- OMN-Traffic-Control-vx.xx.xx-1.FC9 i686/linux 0x0 D: opening db index /var/lib/rpm/Requirename rdonly mode=0x0 D: ========== recording tsort relations D: ========== tsorting packages (order, #predecessors, #succesors, tree, depth, breadth) D: 0 0 0 0 1 0 -OMN-Traffic-Control-vx.xx.xx-1.FC9.i686 D: erasing packages D: closed db index /var/lib/rpm/Requirename D: closed db index /var/lib/rpm/Name D: closed db index /var/lib/rpm/Packages D: closed db environment /var/lib/rpm/Packages D: opening db environment /var/lib/rpm/Packages cdb:mpool:joinenv D: opening db index /var/lib/rpm/Packages create mode=0x42 D: mounted filesystems: D: i dev bsize bavail iavail mount point
一个跟踪模糊的有趣,但没有给出任何问题的线索。
$ ltrace rpm -e PACKAGE __libc_start_main(0x8049680, 3, 0xffab6264, 0x804ae90, 0x804ae80 <unfinished ...> mtrace() = <void> strrchr("rpm", '/') = NULL setlocale(6, "") = "en_US.UTF-8" bindtextdomain("rpm", "/usr/share/locale") = "/usr/share/locale" textdomain("rpm") = "rpm" rpmlogSetMask(63, 0x99a390, 0xf63d4e2e, 0xb3ff08, 28) = 63 poptGetContext(0x804af4c, 3, 0xffab6264, 0x804ce40, 0) = 0x98528d8 rpmConfigDir(0x804af4c, 3, 0xffab6264, 0x804ce40, 0) = 0xce2432 rpmGenPath(0xce2432, 0x804af75, 0, 0x804ce40, 0) = 0x9852b40 poptReadConfigFile(0x98528d8, 0x9852b40, 0, 0x804ce40, 0) = 0 free(0x9852b40) = <void> poptReadDefaultConfig(0x98528d8, 1, 0, 0x804ce40, 0) = 0 rpmConfigDir(0x98528d8, 1, 0, 0x804ce40, 0) = 0xce2432 poptSetExecPath(0x98528d8, 0xce2432, 1, 0x804ce40, 0) = 1 poptGetNextOpt(0x98528d8, 0xce2432, 1, 0x804ce40, 0) = -1 rpmcliConfigured(0x98528d8, 0xce2432, 1, 0x804ce40, 0) = 0 urlIsURL(0xd487af, 0xce2432, 1, 0x804ce40, 0) = 0 rpmLookupSignatureType(1, 0xce2432, 1, 0x804ce40, 0) = 0 rpmtsCreate(1, 0xce2432, 1, 0x804ce40, 0) = 0x98729c8 rpmtsSetRootDir(0x98729c8, 0xd487af, 1, 0x804ce40, 0) = 0 poptPeekArg(0x98528d8, 0xd487af, 1, 0x804ce40, 0) = 0xffab7622 poptGetArgs(0x98528d8, 0xd487af, 1, 0x804ce40, 0) = 0x9852a70 rpmErase(0x98729c8, 0xd5c440, 0x9852a70, 0x804ce40, 0
pstree -p `pidof -s rpm`
为我工作。 我正在运行ps命令试图grep的过程,但我没有find他们全部。
pstree -p `pidof -s rpm`
工作,但我不得不运行大约4-5次,find并摆脱所有的老pid。
我不得不用kill -9来让它们消失。 正常杀和killall不会工作。