Errors When Updating With YUM
Server Distro: CentOS v4
I am trying to update some packages with YUM and this is what I am being told:
Actually, the only packages I *really* want to update are my PHP rpms:
So... two questions:
1. What's the error I'm getting?
2. If I want to side-step there error for the time being and just upgrade PHP, how might I go about that?
I'd like to get php v. 5.3.2 or better if possible.
That is not a traditional yum error. The error is being reported when the binary application "yum" fails to run as it should. So the issue here is really with yum and in most cases this sort of error can indicate a file system corruption or hopefully, a corrupted binary file.
Taking a look at the log files may help point you in the right direction. The kernel messages file at /var/log/messages is likely to have something about the problem and the yum logs also in /var/log/ may contain some info but probably not.
Your best bet here would be to attempt to re-install the yum package manually and see if that helps. This will be dependent on the OS, arch, etc.. that your system is using.
I would first try doing a simply rpm database rebuild and verify to see if that helps.
You may also want to consider backing up your data and running a filesystem check. BACKUP YOUR DATA!
PHP can always be built and compiled from source and most would say that is the best way to go as you can lock down PHP and compile it with only what you need to make it run for your system. However, if this is just a simple CentOS box running some web-apps that are not critical the easy way to go is to add the atomic repository and do a yum update php. Atomic repo is a good one for CentOS and is designed to work with web-apps running under the Plesk control panel. If you are using cPanel you can use EasyApache(see docs.cpanel.net) to recompile php/apache.
An important note here is that upgraded php from the 5.2 family to 5.3 will usually upgrade MySQL as a dependency. In order to complete the upgrade you MUST run the mysqlupgrade command. Check out dev.mysql.com/doc/refman/5.5/en/mysql-upgrade.html.
Start off by reviewing the log files and if you notice anything out of the ordinary post it here so you can get some input on what the actual root cause of your issue may be.
You should also take a look at /etc/yum.repos.d/ and see what repos you have running as the packages you have installed on your system: php-common-5.2.11-jason.1 are definitely not a stable version. Who is Jason? I didnt know he was a revision number..
Worst case scenario you will just need to back up your data, dump your MySQL dbs and re-image. If you have secondary drives or partitions available I would set up a mount there rsync your data over and re-image it just to get those bad packages completely removed.
After doing some searching on the Intertubes (as I should have done in the first place), I came up with this:
yum clean metadata
...and things progressed as I wanted.
Thanks for the YUM tips, it took me down some roads I might not have explored.
Actually the update went very well. Except for php, which is what I need to update. Probably because of the odd versions I'm running.
If my bad memory serves me, the reason I installed these version is because when I *needed* to upgrade, there were not yet any "official" rpm packages for this version, which is what I am now stuck with...
Yum tells me there are no packages to update, but that can't be true, can it?
this is cent 4
the now END OF LIFE cent 4
there will be NO more updates
that was the last
please install the current version of Cent , CentOS 6.2
your BEST bet is to upgrade to cent 6
but if you intend on continuing to use a UNSUPPORTED version
uninstall those non cent rpms
or YUM seeing as it looks like you installed yum on cent4
then remove any repos that are NOT cent4
then remove the needed repo files and rebuild the rpm database
but you should install CentOS6.2
I'm on version 5.4, actually. not 4 (my mistake).
It's nice to be able to just install the latest OS version, well, "because", but that's not always possible.
And, - serious question - if this version has served me well for the most part and been very stable for my needs, what is the benifit to me to upgrading from 5 to 6? To be on CentOS's bleeding edge? Yesterday, when I ran update, was the very first time in almost two years that I had to reboot the machine. There is no mail server running on this box. It is behind a firewall appliance and its sole purpose is to serve web pages, none of which require HTTPS. It's not connected to any tasty networks, and indeed I have large swaths of IP ranges simply blocked because I don't do business in Russia, China, Nigeria, or any of the other Internet vacation spots of ill-repute.
I guess I'm asking if the purpose is to upgrade just to upgrade, or some other reason?
It is unlikely this machine will ever do more than it is doing right now, and php is the single thing I would like a newer version of...
I mean, sure, I'm not trying to be a flaky amateur server admin (amateur yes, but I try not to be flaky), if there is COMPELLING reason to upgrade, well, it has to be done...
If you want to do a quick PHP upgrade on CentOS 5. Add the atomic repo, google wget atomic repo, do yum update php mysql. MySQL will need to be upgraded due to PHP dependencies. So after the yum transaction completes run the mysql_upgrade command on your databases so the MySQL table gets upgraded correctly.
Actually, RHEL/Centos is the stable/production version. The 'bleeding edge' is Fedora, which is used by RH to research/test/refine proposed new functionality.
If you want current versions of SW, upgrading to 5.x or 6.x would be the best way, otherwise you may be trying to force new SW onto an old OS, which is likely to cause issues.
Ultimately it's you choice; if it works for you, go for it.
It's just good to be aware of support/update limits etc.
The support lifetimes are listed here https://access.redhat.com/support/po...pdates/errata/ to help you decide.
You may not know that upgrading in-place across major versions eg 4.x->5.x or 5.x->6.x is not supported, so a clean install is recommended.
Again, it's your choice but I wouldn't do it, especially on a 'prod' system.
|All times are GMT -5. The time now is 07:34 AM.|