Howto install yum on a Virtuozzo container

Please follow the following commands to install yum on your Virtuozzo container . The follwoing commands are to be run from the hardware node .

————————

[root@vps1 ~]# vzlist  -a
CTID      NPROC STATUS    IP_ADDR         HOSTNAME
1         91 running   192.168.46.242  ServiceCT
105         49 running   69.72.234.148   asdf
107         49 running   69.72.234.150   test.test.com2

————————

This will list all the configured containers and their container ID (CTID) which is of importance to us

Assume you have to install yum on container 107

————————

[root@vps1 ~]# vzpkg install -p 107 yum

————————

!please note that If there is no yum available in the template repository it will fail.

Posted under virtuozzo, yum

This post was written by Anoop Alias on August 21, 2008

Tags: ,

yum sqlite error

Sometimes you may get the following error while working with yum:

root@server2 [~]# yum install kernel-smp
Setting up Install Process
Setting up repositories
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
update    : ################################################## 372/372
Traceback (most recent call last):
  File “/usr/bin/yum”, line 29, in ?
    yummain.main(sys.argv[1:])
  File “/usr/share/yum-cli/yummain.py”, line 97, in main
    result, resultmsgs = do()
  File “/usr/share/yum-cli/cli.py”, line 470, in doCommands
    return self.installPkgs()
  File “/usr/share/yum-cli/cli.py”, line 836, in installPkgs
    self.doRepoSetup()
  File “/usr/share/yum-cli/cli.py”, line 75, in doRepoSetup
    self.doSackSetup(thisrepo=thisrepo)
  File “__init__.py”, line 260, in doSackSetup
  File “repos.py”, line 287, in populateSack
  File “sqlitecache.py”, line 96, in getPrimary
  File “sqlitecache.py”, line 89, in _getbase
  File “sqlitecache.py”, line 373, in updateSqliteCache
  File “/var/tmp/python-sqlite-root//usr/lib/python2.3/site-packages/sqlite/main.py”, line 244, in execute
_sqlite.DatabaseError: unable to open database file

To fix this
You will have to erase the sqlite, sqlite-devel,python-sqlite rpm packages in your system

Matching packages have to be manually downloaded and installed 

You can use http://rpm.pbone.net/ to download the package for the particular release of your operating system

rpm -qa|grep -i sqlite
rpm -e sqlite python-sqlite sqlite-devel

Then install the packages downloaded from rpm.pbone.net

Posted under apt, yum

This post was written by Anoop Alias on May 7, 2008

Tags: ,