LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   YUM and RPM dose not do any thing! (https://www.linuxquestions.org/questions/red-hat-31/yum-and-rpm-dose-not-do-any-thing-4175429721/)

parian66 10-01-2012 08:20 AM

As i mentioned in "YUM and RPM dose not do any thing!", i have the same problem with rpm.
And nothing happened
Code:

[root@armansoft ~]# wget http://mirror.vit.com.tr/mirror/CentOS/6.2/os/x86_64/Packages/yum-3.2.29-22.el6.centos.noarch.rpm
--2012-10-01 09:10:33--  http://mirror.vit.com.tr/mirror/CentOS/6.2/os/x86_64/Packages/yum-3.2.29-22.el6.centos.noarch.rpm
Resolving mirror.vit.com.tr... 79.171.16.108
Connecting to mirror.vit.com.tr|79.171.16.108|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1010148 (986K) [application/x-rpm]
Saving to: قyum-3.2.29-22.el6.centos.noarch.rpmق

100%[======================================>] 1,010,148    437K/s  in 2.3s

2012-10-01 09:10:36 (437 KB/s) - قyum-3.2.29-22.el6.centos.noarch.rpmق

[root@armansoft ~]#  rpm -Uvh yum-3.2.29-22.el6.centos.noarch.rpm
[root@armansoft ~]#


Ginola 10-01-2012 09:15 AM

Quote:

Originally Posted by parian66 (Post 4793965)
As i mentioned in "YUM and RPM dose not do any thing!", i have the same problem with rpm.
And nothing happened
Code:

[root@armansoft ~]# wget http://mirror.vit.com.tr/mirror/CentOS/6.2/os/x86_64/Packages/yum-3.2.29-22.el6.centos.noarch.rpm
--2012-10-01 09:10:33--  http://mirror.vit.com.tr/mirror/CentOS/6.2/os/x86_64/Packages/yum-3.2.29-22.el6.centos.noarch.rpm
Resolving mirror.vit.com.tr... 79.171.16.108
Connecting to mirror.vit.com.tr|79.171.16.108|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1010148 (986K) [application/x-rpm]
Saving to: قyum-3.2.29-22.el6.centos.noarch.rpmق

100%[======================================>] 1,010,148    437K/s  in 2.3s

2012-10-01 09:10:36 (437 KB/s) - قyum-3.2.29-22.el6.centos.noarch.rpmق

[root@armansoft ~]#  rpm -Uvh yum-3.2.29-22.el6.centos.noarch.rpm
[root@armansoft ~]#


so yum list or rpm -qa return nothing still, right?

Ginola 10-01-2012 09:21 AM

Try the following commands and reply (via attachment) the strace files in /tmp. There are a couple of common shared dependencies in each app.

Quote:

strace -o /tmp/yum.strace yum list
strace -o /tmp/rpm.strace rpm -qa

Ginola 10-01-2012 09:33 AM

before you do that, try this.

Quote:

tar cvf /tmp/rpmdb.tar /var/lib/rpm/__db.00*
rm -f /var/lib/rpm/__db.00*
rpm -qa

pixellany 10-01-2012 06:53 PM

Can you run other commands?

Does the terminal behave normally except for this command?

John VV 10-01-2012 08:29 PM

At this point with both yum and rpm not even errorring

but giving no output

I would reinstall but with CentOS 6.3 ( centOS 6.2 is End of life)

something is royally messed up

parian66 10-01-2012 11:37 PM

i don't know what happened but the result is here:
Code:

[root@armansoft apache-tomcat-7.0.25]#  tar cvf /tmp/rpmdb.tar /var/lib/rpm/__db.00*
tar: Removing leading `/' from member names
tar: /var/lib/rpm/__db.00*: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
[root@armansoft apache-tomcat-7.0.25]#  rm -f /var/lib/rpm/__db.00*
[root@armansoft apache-tomcat-7.0.25]#  rpm -qa
[root@armansoft apache-tomcat-7.0.25]#

Quote:

Originally Posted by Ginola (Post 4794030)
before you do that, try this.


parian66 10-01-2012 11:44 PM

1 Attachment(s)
i attached the result. please remove '.log' from the end of filename.
Quote:

Originally Posted by Ginola (Post 4794015)
Try the following commands and reply (via attachment) the strace files in /tmp. There are a couple of common shared dependencies in each app.


Ginola 10-02-2012 03:08 AM

Quote:

Originally Posted by parian66 (Post 4794575)
i attached the result. please remove '.log' from the end of filename.

can you check the state of your /usr/lib/rpm/rpmrc file.

also, what is the contents of /root/.rpmrc ?

parian66 10-02-2012 03:21 AM

1 Attachment(s)
I attached both.
Quote:

Originally Posted by Ginola (Post 4794666)
can you check the state of your /usr/lib/rpm/rpmrc file.

also, what is the contents of /root/.rpmrc ?


Ginola 10-02-2012 04:08 AM

what is the last entry in your yum log?

Quote:

tail /var/log/yum.log

John VV 10-02-2012 04:53 AM

A question???

Why are you even trying to back up the rpm database when the program "rpm" is not working ??
if it is not working you can NOT update the rpm database

IF yum and rpm ever worked ( i do not know if they ever did )

if they DID in the past work then you did "something" most likely installed something that was VERY incompatible
( rpmforge and random rpms from the net can do this )

if they NEVER worked
something is VERY VERY WRONG with the install
and the TWO programs needed to fix it are NOT WORKING


i would reinstall with CentOS 6.3
seeing as you would have HAD to upgrade cent anyway , with 6.2 now past it's END OF LIFE

one thing you can try is this
but it is NOT going to fix it
Code:

strace rpm
you "should get a very long output
at the beginning though will be something that looks like this
Code:

execve("/bin/rpm", ["rpm"], [/* 97 vars */]) = 0
brk(0)                                  = 0x604000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x????c????000

if there is then it is installed but broken

parian66 10-02-2012 04:55 AM

Code:

[root@armansoft ~]# tail /var/log/yum.log
Feb 11 15:36:34 Erased: postgresql-plperl
Feb 11 15:36:34 Erased: postgresql-server
Feb 11 15:36:35 Erased: postgresql
Feb 18 07:16:40 Installed: cvs-1.11.23-11.el6_0.1.x86_64
Feb 22 06:00:53 Installed: 2:xinetd-2.3.14-33.el6.x86_64
Sep 25 05:32:04 Installed: miniupnpc-1.5-1.el6.rf.x86_64
Sep 25 05:32:05 Installed: dante-1.3.2-1.el6.rf.x86_64



[root@armansoft ~]#

Quote:

Originally Posted by Ginola (Post 4794700)
what is the last entry in your yum log?


parian66 10-02-2012 05:12 AM

Yes,they worked in the past. is there any way to upgrade to 6.3 without losing installed program like cvs, tomcat, postgres , ...?
Quote:

Originally Posted by John VV (Post 4794734)
A question???

Why are you even trying to back up the rpm database when the program "rpm" is not working ??
if it is not working you can NOT update the rpm database

IF yum and rpm ever worked ( i do not know if they ever did )

if they DID in the past work then you did "something" most likely installed something that was VERY incompatible
( rpmforge and random rpms from the net can do this )

if they NEVER worked
something is VERY VERY WRONG with the install
and the TWO programs needed to fix it are NOT WORKING


i would reinstall with CentOS 6.3
seeing as you would have HAD to upgrade cent anyway , with 6.2 now past it's END OF LIFE

one thing you can try is this
but it is NOT going to fix it
Code:

strace rpm
you "should get a very long output
at the beginning though will be something that looks like this
Code:

execve("/bin/rpm", ["rpm"], [/* 97 vars */]) = 0
brk(0)                                  = 0x604000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x????c????000

if there is then it is installed but broken


Ginola 10-02-2012 06:06 AM

Quote:

Originally Posted by parian66 (Post 4794743)
Yes,they worked in the past. is there any way to upgrade to 6.3 without losing installed program like cvs, tomcat, postgres , ...?

Since the yum.log suggests this was working a week ago, did you manage to clean the yum cache as a last action? The reason I ask is, it looks like ( from the strace log) that rpm never even gets to those dirs.

Yeah, I'd upgrade as suggested above.


All times are GMT -5. The time now is 02:14 AM.