Fix locales warning on Debian or Ubuntu

Sometimes you get the following warning when running commands in Debian / Ubuntu powered computers

==============

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = “en_US.UTF-8″
are supported and installed on your system.
perl: warning: Falling back to the standard locale (”C”).

===============

To fix this run the following command as root

root@php-server:~# apt-get install language-pack-en-base

Posted under Debian, apt

This post was written by Anoop Alias on August 23, 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: ,