LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   yum - how to re-install a package (https://www.linuxquestions.org/questions/linux-newbie-8/yum-how-to-re-install-a-package-4175420524/)

john@ackley.net 08-05-2012 05:44 PM

yum - how to re-install a package
 
CentOS 6.3
I have broken install (some executable files accidently overwritten)

I tried:
<code>
yum erase wine
yum install wine
</code>
does not restore missing files

how to erase a package and re-install?

yum erase wine
leaves all the executable files in place

chrism01 08-05-2012 06:56 PM

Code:

yum reinstall wine
http://linux.die.net/man/8/yum ?
Alternatively, try 'yum clear all', then reinstall, or http://hacktux.com/yum/force/reinstall ?
Just be careful & take a good backup before you start.

You might even find that if you've managed to erase part of wine, the a 'yum update wine' will work.

john@ackley.net 08-05-2012 07:04 PM

thanks
goes through the motions
but no luck


"wine" is one of the executable needing replacement

Installed:
wine.x86_64 0:1.2.3-1.el6

Complete!
[root@paradise bin]# ls -l wine*
-rw-r--r--. 1 root root 0 Aug 5 19:59 wine
-rwxr-xr-x. 1 root root 1055376 Apr 11 2011 wine64
-rwxr-xr-x. 1 root root 1582 Apr 11 2011 wineboot
-rwxr-xr-x. 1 root root 1582 Apr 11 2011 winecfg
. . .

chrism01 08-05-2012 07:06 PM

Remove those files by hand; it should then notice the problem when you try to install/reinstall it.

john@ackley.net 08-05-2012 07:10 PM

http://hacktux.com/yum/force/reinstall

same lack of result

john@ackley.net 08-05-2012 07:16 PM

deleted /usr/bin/wine*

yum reinstall wine
. . .
Installed:
wine.x86_64 0:1.2.3-1.el6

Complete!

[root@paradise bin]# ls wine*
ls: cannot access wine*: No such file or directory
[root@paradise bin]#

[root@paradise bin]# pwd
/usr/bin

chrism01 08-05-2012 07:42 PM

Odd; did you do a 'yum clean all' each time as well?
Basically you have to remove the SW AND remove the entries in the rpm DB (which underlies yum).
you can also try
Code:

rpm -qa|grep -i wine

#then
rpm -e <wine rpms mentioned above>

drastic but effective & do another 'yum clean all' afterwards before re-installing or 'updating'.
You could also do this immediately after the 'rpm -e ...'
Code:

rpm --rebuilddb
http://linux.die.net/man/8/rpm

john@ackley.net 08-05-2012 08:09 PM

SOLVED!
this did it!
thanks!

rpm -qa|grep -i wine

#then
rpm -e <wine rpms mentioned above>


some minor problems with order of removal

finally an endless loop:

[root@paradise ~]# rpm -qa | grep -i wine
wine-core-1.2.3-1.el6.x86_64
wine-common-1.2.3-1.el6.noarch
[root@paradise ~]# rpm -e wine-core-1.2.3-1.el6.x86_64
error: Failed dependencies:
wine-core = 1.2.3-1.el6 is needed by (installed) wine-common-1.2.3-1.el6.noarch
[root@paradise ~]# rpm -e wine-common-1.2.3-1.el6.noarch
error: Failed dependencies:
wine-common = 1.2.3-1.el6 is needed by (installed) wine-core-1.2.3-1.el6.x86_64

each dependent on the other
none the less after "yum install wine"
wine seems to be working again
although now a short list of wine* in /usr/bin
???

chrism01 08-05-2012 08:43 PM

Glad to help. :)
Maybe a short list is all you need there, or some of it is installed elsewhere.
You can use
Code:

yum info wine\*
yum search wine\*

to get more detailed info.
See also the home site www.winehq.org


All times are GMT -5. The time now is 06:21 PM.