Yum install error

installationyum

I can't run a yum command on my server without getting this:

CRITICAL:yum.cli:Config Error: Error accessing file for config file:///etc/yum.conf

This is what my yum.conf looks like:

# This is the fedorafaq.org yum.conf for Fedora Core 5.
#
# Note that you also need the rest of the configuration
# as described at http://www.fedorafaq.org/#yumconf

[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
metadata_expire=1800

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d

This is what my yum.repos.d looks like:

fedora.repo
fedora-updates.repo
fedora-updates-testing.repo

The permissions on those files are 0666 and it won't allow me to make them root:root

Best Answer

If you are unable to change the file to root:root; and you are root. Then the most likely situation is that the immutable parameter has been set on the file. Confirm and change the file's attributes.

# lsattr /etc/yum.conf
----i--------e-- /etc/yum.conf 

IF this is the output from the previous command, do the following.

# chattr -i /etc/yum.conf
# lsattr /etc/yum.conf
-------------e-- /etc/yum.conf
Related Question