This page offers some help setting up Ohcount on Ubuntu Linux. It's easier on 7.10, but can also be done under 6.06. The same applies to Debian "etch" and Debian "lenny".
Installing Prerequisites
Ohcount is a Ruby application with C native extensions. Ohcount requires Ruby, Rdoc, Rake, RubyGems, GCC, and the PCRE library.
Ubuntu 7.10
Happily, there are packages for everything. If you have a default desktop install, you can install everything required by Ohcount:
sudo apt-get install libpcre3-dev ruby1.8 ruby1.8-dev rake rubygems
Proceed to the step "Getting the Ohcount Source."
Ubuntu 6.06 LTS (Dapper Drake)
Setting up on Ubuntu 6.06 is a little bit more involved because the package manager does not have everything you need.
To build the C native extensions, you require the GCC complier and the pcre regular expression libraries (www.pcre.org).
apt-get install build-essential apt-get install libpcre3-dev
Install Ruby:
apt-get install ruby1.8 ruby1.8-dev
Install Rdoc. To install this package, you must enable the 'universe' packages in /etc/apt/sources.list:
apt-get install rdoc
Build and install the Ruby Gems package manager from source:
wget http://rubyforge.org/frs/download.php/29548/rubygems-1.0.1.tgz tar xzf rubygems-1.0.1.tgz cd rubygems-1.0.1 ruby setup.rb ln -s /usr/bin/gem1.8 /usr/bin/gem
Install Rake:
gem install rake
Getting the Ohcount Source
Download and expand the Ohcount source tarball:
wget http://labs.ohloh.net/download/ohcount-1.0.2.tar.gz tar xzf ohcount-1.0.2.tar.gz cd ohcount-1.0.2
Build Ohcount
To build Ohcount and run the unit tests:
rake clean rake
To install Ohcount:
rake install
Notes
While building Ohcount, during the rake install step you may see an error message similar to the following:
File not found: lib/x86_64-linux
It's possible that the install has succeeded, even though you are seeing an error message. Try running ohcount to confirm the install:
$ ohcount --help
This error message is a known bug: http://labs.ohloh.net/ohcount/ticket/229#comment:2