LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-21-2008, 04:20 AM   #1
josinjosek
LQ Newbie
 
Registered: Feb 2008
Posts: 5

Rep: Reputation: 0
Question RPM command is not working (Segmentation fault)


In one of my linux box rpm command is not working.i am getting "Segmentation fault " error and i found inside /var/lib/rpm dir
__db.001 ,__db.002,__db.003 these files are missing can you please help me to resolve this issue.

#locate rpm | grep bin
/bin/rpm
/usr/bin/rpmgraph
/usr/bin/rpmbuild
/usr/bin/rpm2cpio
/usr/bin/rpmquery
/usr/bin/rpmdb
/usr/bin/rpmverify
/usr/bin/pamsharpmap
/usr/bin/rpmsign
 
Old 02-21-2008, 12:46 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Since when isn't it working? What happened at that time? (check logs?) Which files are missing exactly? Can you boot your distro's installer CD in recue mode to check with 'rpm -qVa'?
 
Old 02-21-2008, 11:33 PM   #3
josinjosek
LQ Newbie
 
Registered: Feb 2008
Posts: 5

Original Poster
Rep: Reputation: 0
hi unSpawn,
Thanks for your replay.
Issue is resolved, we have copied the (__db.001 ,__db.002,__db.003 files ) from usr/lib/rpmdb/x86_64-redhat-linux/redhat to /var/lib/rpm and reloaded the rpm database. Now the rpm command is working fine. Thanks a lot..
 
Old 05-11-2009, 10:57 AM   #4
madyogi
LQ Newbie
 
Registered: Feb 2009
Location: Poland
Distribution: My own, Fedora, OpenSuse
Posts: 21

Rep: Reputation: 2
rpm & segmentation fault again...

Hello.
I have a very same problem.

I'm updating software on my old post RH9 Linux server. Everything is 99.9% done from sources...
Did plenty of updates including kernel (2.6.27.x), glibc (2.4), gcc, binutils (2.18), gtk2+, openssl, automake & autoconf, and plenty, plenty of others... This all is done on a live 'body' so I have to be careful.

Old rpm package (4.2) stopped working after glibc update (I really don't want to go back to the old one).
The entire system is stable and everything else seems to work fine, it reboots, mounts drives, plays CDs, even starts X window with old 3.4 KDE, all services are working well.

Lately decided to update the RPM package to the latest 4.7.0 ver.
I have a copy of the old rpm database in safe place so I can do anything with /var/lib/rpm/*
Also saved the /var/log/rpmpkgs.

Before compiling RPM itself I had to update/install following:

- NSS & NSPR libraries (Mozilla),
- Berkeley db-4.5.20 (also required for latest sendmail releases),
- LUA language library,

Well, after doing:
]$ cd rpm-4.7.0 (source)
]$ ./configure --prefix=/usr --with-external-db --with-lua=/usr/local CPPFLAGS="-I/usr/include/nspr -I/usr/include/nss/nss -I/usr/include/nss/dbm"
]$ make // everything went fine here
]$ make check // 72 tests but plenty of them failed

You can download the logfile, a result of 'make check' procedure here:
http://www.ptatera.pl/download/rpmtests.log

Finally I did:
]$ make install
]$ mkdir /var/lib/rpm
]$ chown rpm.rpm /var/lib/rpm
]$ rpm --initdb
And it throws out "Segmentation fault"
then:
]$ tail /var/log/messages
gives:
May 11 17:02:19 seawolf kernel: rpm[6168]: segfault at 0 ip 00000000 sp bfeacdfc error 4 in rpm[8048000+4000]

Exactly the same way the rpm-4.6 dist. works... (or rather isn't working).

Could anyone help please?
Regards.

P.S.
And yes, I've moved from i386 to i686 arch...
 
Old 05-12-2009, 06:13 AM   #5
madyogi
LQ Newbie
 
Registered: Feb 2009
Location: Poland
Distribution: My own, Fedora, OpenSuse
Posts: 21

Rep: Reputation: 2
OK. Downloaded latest stable release of gcc-4.4.0 and now the rpm source doesn't build at all. It throws out plenty of errors. Starting like:
Code:
gcc -shared  .libs/argv.o .libs/base64.o .libs/digest.o .libs/fts.o .libs/macro.o .libs/rpmhook.o .libs/rpmio.o .libs/rpmlog.o .libs/rpmlua.o .libs/rpmmalloc.o .libs/rpmpgp.o .libs/rpmsq.o .libs/rpmsw.o .libs/url.o .libs/rpmstring.o .libs/rpmfileutil.o .libs/rpmkeyring.o -Wl,--whole-archive ../misc/.libs/libmisc.a -Wl,--no-whole-archive  -lnss3 -lbz2 -lz /usr/lib/libpopt.so -lrt -lpthread  -Wl,-soname -Wl,librpmio.so.0 -o .libs/librpmio.so.0.0.0
.libs/base64.o: In function `__cmsg_nxthdr':
/usr/include/bits/socket.h:265: multiple definition of `__cmsg_nxthdr'
.libs/argv.o:/usr/include/bits/socket.h:265: first defined here
Any suggestions?

Last edited by madyogi; 05-12-2009 at 06:16 AM.
 
  


Reply

Tags
rpm



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Rpm installation gives segmentation fault TrupsT Linux - Software 3 08-22-2006 10:21 AM
rpm -anything gives Segmentation Fault dtashima Red Hat 8 12-02-2004 10:21 AM
RPM segmentation fault gaurava99 Linux - Software 1 07-16-2004 08:34 AM
Segmentation fault using RPM janisj Linux - General 3 05-11-2004 07:35 AM
Segmentation Fault [rpm is not working] saeed Linux - Software 6 01-27-2004 10:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration