rpmdb: Lock table is out of available locker entries

Fedora, Linux No Comments »

If while using ‘yum’ or ‘rpm’ you receive the following error:

rpmdb: Lock table is out of available locker entries

Your RPM dB files are screwed up… here is how you unscrew them!

This error tell you the Berkley database files which RPM uses are damaged and in order to clear the error you must rebuild the Berkley dB files from scratch.

Here is how you fix this error:

  1. Make a backup of your current files
  2. Remove the damaged files
  3. Rebuild your RPM Berkley dB files
  4. Use yum again

Here is the command walk through:

  1. As root, execute this:
    cd /root; tar cvzf rpm-backup.tar.gz /var/lib/rpm
  2. Remove the Berkeley dB files which yum and rpm use:
    rm /var/lib/rpm/__db.00*
  3. Instruct rpm to rebuild the databases files:
    rpm --rebuilddb
  4. Test your yum command again:
    yum install somepackage
No Comments - Post Your Comment »
Digg!

Setting Environment Variables in Perl

Perl No Comments »

If you ever have to set an environment variable you may run into the same reality I ran into.

A simple call to system using export (as you might do on the command line)…

system( "export MYVAR=somevalue" );

…does not work!

You have to use the Perl ENV hash variable:

$ENV{'MYVAR'} = "somevalue";

Changes to $ENV{’SOMEVAR’} will be available to the current process and children processes only. Thus, if you change an environment variable for an upcoming system() call the process started due to the system() call will see the environment variable change.

Here is an example:

.
.
.
$ENV{'http_proxy'} = "192.168.0.10";
system( "wget --tries=2 --timeout=8 $url" );
.
.
.
No Comments - Post Your Comment »
Digg!

Parsing Out Specific Values In a Text File

Linux, Regular Expressions (regex) No Comments »

Another task which hits my desk often is getting “data” out of text files. Such as names, email addresses, phone numbers, ID numbers, etc. Here is a quick way to parse or rip out “data” from a text file.

I suggest using ‘grep’ — grep is one of those applications which is more powerful than the casual user realizes. And let’s face it, if you use or know what grep is you probably do not consider yourself a casual user.

grep -o -P "[regex_pattern]" [filename]

The -o tells grep to only output what it matched in your pattern where your [regex_pattern] is your pattern.
The -P tells grep to use Perl Regular Expressions

No Comments - Post Your Comment »
Digg!

Playing MP3 files in Fedora 7

Fedora No Comments »

To play MP3 files in Fedora 7 you need to add software to your default installation:

  1. First, add Livna sources using rpm
    rpm -ivh http://rpm.livna.org/livna-release-6.rpm
  2. Next, Install Rhythmbox using yum
    yum install rhythmbox
  3. Next, Install gstreamer-plugins-ugly** using yum
    yum install gstreamer-plugins-ugly
  4. That is it, next launch Rythmbox and hello music!
    Rythmbox Launch

    Q: Hey Chris, why does the gstreamer-plugins end in “-ugly”
    A: Good question, tough answer, the GStreamer is a streaming media library which contains plug-ins which cannot be shipped in gstreamer-plugins-good because the license is not LGPL. Please note the the license of the entire library is not LGPL! So of course you shouldn’t install it unless you pay the owners for licensing rights.

No Comments - Post Your Comment »
Digg!

Reload fstab (/etc/fstab)

Fedora, Linux 1 Comment »

If you make a new entry in fstab it will not auto-mount. Therefore you must reload / refresh the entries. A reboot will do this but that is not a friendly way to do it. A quick way to reload new entries in /etc/fstab (fstab) is to use the mount command:

mount -a


Mount -a
1 Comment »
Digg!

The HTML Validator Firefox Plugin In Linux

Fedora, Firefox No Comments »

I use the “HTML Validator” Firefox plugin daily. I found it does not work out of the box in Linux namely Fedora Core 6 and Fedora 7. You immediately get a HTML-rendered screen that states:

FATAL ERROR : The dynamic C library contained in the extension file could not be found

Getting rid of this message took me a few minutes of research and I never found a step-by-step HOW-TO for Fedora — so here goes!

Here is how you get rid of this message and get the plugin working in Fedora Core 6 or Fedora 7:

  1. First, uninstall the plugin by clicking on Tools–>Add-ons and clicking uninstall
    Remove HTML Validator
  2. Second, close all instances of Firefox
  3. Next, install three packages using yum
    • compat-libstdc++-296
    • compat-libstdc++-33
    • tidy
    linux> yum install compat-libstdc++-296 compat-libstdc++-33 tidy
  4. Reinstall the HTML Validator plugin
  5. Restart Firefox, done!

HTML Validator should now be installed inside of Firefox on Fedora Core 6 or Fedora 7

No Comments - Post Your Comment »
Digg!
Original Design by j david macor.com. Original WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in