OpenVZ Forum


Home » General » Support » YUM Error CentOS Template
YUM Error CentOS Template [message #152] Fri, 23 September 2005 04:15 Go to next message
devnu11 is currently offline  devnu11
Messages: 64
Registered: September 2005
Location: USA
Member

I just installed all the latest RPM's and used the down loadable CentOS template from the OVZ website. I installed YUM into the newly created VPS via vzyum. When I try and use YUM from inside the VPS I get the following error:

# yum install nano
Setting up Install Process
Setting up Repos
dag 100% |=========================| 1.1 kB 00:00

update 100% |=========================| 951 B 00:00
base 100% |=========================| 1.1 kB 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files
Traceback (most recent call last):
File "/usr/bin/yum", line 7, in ?
yummain.main(sys.argv[1:])
File "/usr/share/yum-cli/yummain.py", line 68, in main
result, resultmsgs = base.doCommands()
File "/usr/share/yum-cli/cli.py", line 406, in doCommands
return self.installPkgs()
File "/usr/share/yum-cli/cli.py", line 813, in installPkgs
self.doRepoSetup()
File "/usr/share/yum-cli/cli.py", line 89, in doRepoSetup
self.doSackSetup()
File "__init__.py", line 143, in doSackSetup
File "repos.py", line 243, in populateSack
File "mdcache.py", line 103, in getPrimary
File "mdcache.py", line 90, in _getGeneric
File "mdcache.py", line 62, in _unpickle
EOFError

Any ideas how to solve this?


Just Because You Have One, Doesn't Mean You Have To Be One!
Re: YUM Error CentOS Template [message #157 is a reply to message #152] Fri, 23 September 2005 08:10 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

First, it's preferrable to use vzyum for installation of packages inside the VPS, just because that way there will be a common yum cache to be used by all VPSs based on a given OS template. Well, if you plan to have just one CentOS VPS, you can use yum from inside VPS as well.

So the questions are:
1. What your host system rpm and yum versions are? ('rpm -q rpm yum')
2. Does rpm -q work inside your VPS? What VPS' rpm and yum versions are? ('rpm -q rpm yum' inside VPS).
3. Try 'yum makecache' inside VPS if your yum version supports it


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: YUM Error CentOS Template [message #161 is a reply to message #152] Fri, 23 September 2005 18:01 Go to previous messageGo to next message
devnu11 is currently offline  devnu11
Messages: 64
Registered: September 2005
Location: USA
Member

Ok, you brought up some important questions which I should have included in my original post. I did find a fix though Surprised
I used the following once and it solved my YUM problems then and thereafter:

PYTHONPATH=/usr/lib/python2.3/site-packages yum update

I'm guessing if I installed Python-Devel It might have cleared it up too. As always, thanks for assisting, It is much appreciated.

**EDIT**

I should explain that I used "vzpkgcache centos-4" to make a centos tar.gz for the /vz/templates/cache I tryed the above on a newly built VPS (102) with the new tar.gz file and it corrected the error. I tried the above on the original VPS (101) and it DID NOT correct the yum error even after installing python-devel.

So VPS 102 has a working YUM. As a side note "DF" yields no output on this CentOS install.

VPS 101 Does not have a working YUM but "DF" works as it should

Confused


Just Because You Have One, Doesn't Mean You Have To Be One!

[Updated on: Fri, 23 September 2005 18:15]

Report message to a moderator

Re: YUM Error CentOS Template [message #163 is a reply to message #161] Sat, 24 September 2005 08:02 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

As for 'df' problem, do you have /etc/mtab? Normally, it should be present and be a symlink to /proc/mounts

Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: YUM Error CentOS Template [message #169 is a reply to message #163] Sun, 25 September 2005 23:52 Go to previous messageGo to next message
rpatrick is currently offline  rpatrick
Messages: 3
Registered: September 2005
Junior Member
After creating a CentOS-4 VPS by following the steps outlined in the PDF userguide, mtab was a regular file with this content:

none /dev/pts devpts rw 0 0

We don't get df output with that, so removing that file and creating the symlink fixes things up.

rm -f /etc/mtab
ln -s /proc/mounts /etc/mtab

Once the symlink is created, df from inside the VPS correctly displays the amount of disk space free.

Example:

[root@vps ~]# df -h
Filesystem Size Used Avail Use% Mounted on
simfs 1.0G 413M 612M 41% /

Re: YUM Error CentOS Template [message #171 is a reply to message #169] Mon, 26 September 2005 08:28 Go to previous message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

This is a bug in centos-4 template that claimed to be fixed in 1.0-5 version of template metadata, but not actually fixed.

I just put the issue to bugzilla as bug #45. For now, to fix the bug please add the following lines to the end of /vz/template/centos/4/config/install-post file:
# Link /etc/mtab to /proc/mounts
rm -f $VE_ROOT/etc/mtab
ln -s /proc/mounts $VE_ROOT/etc/mtab


After that, you have to recreate template cache from scratch:
vzpkgcache -f centos-4


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Previous Topic: FC 3 & 4 NIC and hotplug problem
Next Topic: OpenVZ and 2.4 kernel support for VPSes
Goto Forum:
  


Current Time: Tue Jul 29 16:36:22 GMT 2025

Total time taken to generate the page: 0.07654 seconds