Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm not sure what happened with rpm on my system. This is a CentOS 6.3 VM hosted on Amazon EC2 if that makes a difference.

When I run any rpm commands, it returns to the command prompt doing nothing. The only thing that does return anything is:

rpm --help

Anything else just does nothing. No error message, no log message, nothing... I don't know how to continue.

By using strace as suggested, I believe that rpm is failing during the reading of /usr/lib/rpm/rpmrc. I have compared this rpmrc with a working system and there are no differences. I'm not sure how to continue...

Here are the last lines from strace:

stat("/home/tscdev/.rpmrc", 0x7fffffb4ffc0) = -1 ENOENT (No such file or directory)
access("/usr/lib/rpm/rpmrc", R_OK)      = 0
open("/usr/lib/rpm/rpmrc", O_RDONLY)    = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=13698, ...}) = 0
rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [], 8) = 0
exit_group(1)                           = ?

Here is a directory listing of the database directory (/var/lib/rpm):

total 48532
drwxr-xr-x  2 root root     4096 Apr 19 12:46 .
drwxr-xr-x 22 root root     4096 Feb 14 14:44 ..
-rw-r--r--  1 root root  2826240 Feb 14 14:44 Basenames
-rw-r--r--  1 root root    12288 Feb 14 14:44 Conflictname
-rw-r--r--  1 root root  1478656 Feb 14 14:44 Dirnames
-rw-r--r--  1 root root  5238784 Feb 14 14:44 Filedigests
-rw-r--r--  1 root root    16384 Feb 14 14:44 Group
-rw-r--r--  1 root root    12288 Feb 14 14:44 Installtid
-rw-r--r--  1 root root    24576 Feb 14 14:44 Name
-rw-r--r--  1 root root    12288 Feb 14 14:44 Obsoletename
-rw-r--r--  1 root root 37629952 Feb 14 14:44 Packages
-rw-r--r--  1 root root  1335296 Feb 14 14:44 Providename
-rw-r--r--  1 root root   655360 Feb 14 14:44 Provideversion
-rw-r--r--  1 root root    12288 Aug 20  2012 Pubkeys
-rw-r--r--  1 root root   204800 Feb 14 14:44 Requirename
-rw-r--r--  1 root root   139264 Feb 14 14:44 Requireversion
-rw-r--r--  1 root root    45056 Feb 14 14:44 Sha1header
-rw-r--r--  1 root root    40960 Feb 14 14:44 Sigmd5
-rw-r--r--  1 root root    12288 Oct 29 17:12 Triggername
share|improve this question
1  
What about: strace rpm ? –  Marek Wajdzik Apr 19 '13 at 17:33
    
@MarekWajdzik - Thanks for the suggestion. That at least got me something to look at. I have to take a look at the system calls to see what is causing the hangup. –  Starkey Apr 19 '13 at 18:54
    
try rpm -qa to see if the database is happy. You could try rpm --rebuilddb –  egorgry Apr 19 '13 at 19:37
    
@egorgry I've tried both rpm -qa and rpm --rebuilddb. Both commands do nothing and return to the command prompt. –  Starkey Apr 19 '13 at 19:39
    
apt-get install rpm ;)does yum work? Any additional info in the logs? –  egorgry Apr 19 '13 at 19:42

1 Answer 1

On my system the rpm --help output comes from processing files in /usr/lib/rpm/rpmpopt*, which themselves come as part of the rpm package. To check this on your server I would run:

$ rpm --verify rpm
$ ls -l /usr/lib/rpm/rpmpopt*
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.