Centos 5.4 – install x windows KDE doesn’t work (x86_64) [solved]

If you like me installed Centos 5.4 (x86_64) on a machine without having installed X windows (KDE or Gnome) and tried to re-install it afterwards and run into problems – it’s normal.

You will no doubt have found all these posts about how you should run:-

yum groupinstall "X Window System" "GNOME Desktop Environment"

or

yum groupinstall "X Window System" "KDE (K Desktop Environment)"
And then if there was a problem – there would be posts telling you that “GNOME Desktop Environment” is case-sensitive – blah blah…. So then you double check the command you ran and you find that you are correct. And then you think it may be a video card drivers problem. When you run the above command you will receive many “Transaction check error”s such as the ones below such as the following and others with Openssl.

file /usr/share/man/man8/selinux.8.gz from install of libselinux-utils-1.33.4-5.5.el5 conflicts with file from packagelibselinux-1.33.4-2.el5

In fact, the problem is to do with the architecture of your computer which arises from packages for both i386 and x86_64 being installed for OpenSSL and if you try to uninstall openssl there will be about 500 other packages that you will need to install.
Solution
When you run:-
yum groupinstall "X Window System" "KDE (K Desktop Environment)"
and you get transaction check errors – then you must find out what is conflicting and then if openssl is conflicting then run
yum remove openssl*.i386
And then you will prompted with about 30 dependencies that need to uninstalled… I uninstalled these dependencies and everything still worked – I can’t guarantee that it would work for you too.
After you do that X Windows should install properly when you run the following command again:-
yum groupinstall "X Window System" "KDE (K Desktop Environment)"
For the future to avoid having this architecture problem; you should include a line to exclude other i386 packages from being installed:-
(1) Go into /etc/yum.conf
(2) Add line exclude='*.i386 *.i486 *.i586 *.i686 *.athelon'