Question

I need to install libmemcache onto a CentOS box. I don't have root privileges, so preferably everything would go somewhere inside my home directory.

I've tried downloading libmemcached-1.0.12.tar.gz and building it with ./configure --prefix=/home/charrison, make install, but this inscrutably failed. Something clued me to install libevent, which helped somewhat, but ultimately the libmemcached make is now failing as follows:

In file included from ./libmemcached/common.h:72,
             from ./libmemcached/csl/common.h:40,
             from libmemcached/csl/context.cc:38:
./libmemcached-1.0/memcached.h:46:27: error: tr1/cinttypes: No such file or directory

And, even if I resolved that, who knows how many more prerequisites exist?

Then it occurred to me "Hey, isn't this what 'package managers' are for? To know about and install prerequisites?" I discovered that RPM is the CentOS package manager, but I drowned in the man page. I'm not even sure whether it is capable of downloading packages or knowing about dependencies.

The only "package manager" I have any experience with is cpan, which is pretty powerful and simple.

So I'd really like to know

  • how to install libmemcached in CentOS privately, and if possible,
  • what a package manager does and does not do
Was it helpful?

Solution

Here is my answer to the two questions. Hope it helps you.

  1. how to install libmemcached in CentOS privately, and if possible,

    (Step 1) download libmemcached RPM package from CentOS mirror site such as ftp://ftp.riken.jp/Linux/centos/<centos version>/os/<your arch>/Packages/.

    (Step 2) extract the package in a current directory by using rpm2cpio command.

    e.g., $ mkdir foo; cd foo; rpm2cpio ../libmemcached-*.rpm | cpio -di

  2. what a package manager does and does not do

    rpm command allows you to find out what packages are installed(*1). Also, you can confirm the dependencies among multiple packages(*2), what package the specified file belongs to(*3) and what files the specified package contains(*4).

    (*1) e.g., $ rpm -qa

    (*2) e.g., $ rpm -q --requires foo

    (*3) e.g., $ rpm -qf /etc/foo.conf

    (*4) e.g., $ rpm -ql foo

I think that Maximum RPM(http://www.rpm.org/max-rpm/) is very useful site for you.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top