cannot check for updates using yum in centos,gives unusual error
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
cannot check for updates using yum in centos,gives unusual error
Hi again,
2day i tried checking for updates using the yum command in one of the name servers where centos is installed and it gave the following error:
Code:
Cannot open logfile /var/log/yum.log
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in ?
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 309, in user_main
File "/usr/share/yum-cli/yummain.py", line 166, in main
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 1150, in doLock
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 1203, in _lock
OSError: [Errno 30] Read-only file system: '/var/run/yum.pid'
Can anyone please tell me what has happened...i cant see anything in the logs either..
it says can't open var/log/yum.log but when i check it i can read it and even the permissions are correct and i cant evn edit the .bash_profile.
sounds like something is shafted on your disk, esp as you added you can't edit .bash_profile either. Run "dmesg", and you might see a pile of filesystem errors. Probably best to reboot the system and allow the fsck to scan the filesystem for errors, but obviously that depends *MASSIVELY* on what has actually gone on... It certainly could be very serious...
I rebooted the server and now it worked,i even updated it.
ya i could edit my .bash_profile also,paths were missing and i added that by copying it from other user because i still don't know what kind of system path should we b giving. If you could explain me or provide me a link to study that,i would b really glad..
N do u have any idea why did that error happen before?i'm so confused..
And now seriously:
Probably your hard disk is having BAD sectors that is why you should check it if you can shutdown the server and run some diagnostics on hard drive.
so, obviously you can't write to a read-only partition.
You need to fsck that partition, either manually by taking it off-line or by setting it to check in /etc/fstab, especially if this is the root partition; it can't be done online. http://linux.die.net/man/8/fsck
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.