-   Linux - Newbie (
-   -   yum - how to re-install a package ( 08-05-2012 06:44 PM

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

I tried:
yum erase wine
yum install wine
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 07:56 PM


yum reinstall wine ?
Alternatively, try 'yum clear all', then reinstall, or ?
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. 08-05-2012 08:04 PM

goes through the motions
but no luck

"wine" is one of the executable needing replacement

wine.x86_64 0:1.2.3-1.el6

[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 08:06 PM

Remove those files by hand; it should then notice the problem when you try to install/reinstall it. 08-05-2012 08:10 PM

same lack of result 08-05-2012 08:16 PM

deleted /usr/bin/wine*

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


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

[root@paradise bin]# pwd

chrism01 08-05-2012 08: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

rpm -qa|grep -i wine

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 ...'

rpm --rebuilddb 08-05-2012 09:09 PM

this did it!

rpm -qa|grep -i wine

rpm -e <wine rpms mentioned above>

some minor problems with order of removal

finally an endless loop:

[root@paradise ~]# rpm -qa | grep -i wine
[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 09:43 PM

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

yum info wine\*
yum search wine\*

to get more detailed info.
See also the home site

All times are GMT -5. The time now is 07:06 AM.