Jeremy Smith's blog

Entry Is Labelled

Operating Systems without Automatic Package Management Tools Are Deprecated

(And by "automatic package management tools," I mean the one's that actually handle dependencies seamlessly i.e. NOT RPM.)

This is maddening.

And, let me also point out, the long rant I am about to go on is probably completely false. I am probably just being stupid and do not know how to use RPMs. I acknowledge this shortcoming on my own free will. I know nothing about RPMs. (Other than how much suck they contain.)

So, today, I figured I would install mod_log_sql and get that running on Blog@Case. No big deal, right? It's just an Apache module. So, I download it and begin.

root@blog# ./configure
.
.
.
[snipped]
configure: error: *** The apxs binary installed by apache could not be found!

Okay, fine. I'll read your help.

root@blog# ./configure --help

Okay, let's try this again.

root@blog# ./configure \
--with-apxs=/usr/local/apache/bin/apxs \
--with-mysql=/usr/local/mysql \
--enable-ssl --with-ssl=/usr/local/ssl
.
.
.
[snipped]
*** WARNING libdbi not found ***

Okay, so I grabbed libdbi and the MySQL libdbi-driver. They installed without much trouble. Back to mod_log_mysql.

root@blog# ./configure \
--with-apxs=/usr/local/apache/bin/apxs \
--with-mysql=/usr/local/mysql \
--enable-ssl --with-ssl=/usr/local/ssl
.
.
.
[snipped]
checking for mysql_init in -lmysqlclient... yes
checking for mysql_real_escape_string... yes
checking whether mysql clients can run... no
*** MySQL could not be found ***
configure: error: *** Mysql client libraries not found!

WHAT?!? Wait, you found libmysqlclient but are telling me that you can't find the client libs? Okay, what gives?

Hunting around, I discovered that MySQL, during compilation and installation from source, doesn't put all of the client libs in place. Okay, whatever. You need to install those separately.

Okay. If I was on Debian (where I am most comfortable), I would just do apt-get install mysql-client. No fuss; no muss — it's as simple as it should be. Red Hat has RPM, so I should be able to use that... right?

root@blog# rpm -i mysql-client
error: open of mysql-client failed: No such file or directory

Sure, sure, how lucky did I think I was going to get.

root@blog# man rpm

So, it seems I have to go out and find the RPM, download it, and then install it. I hunt it down and wget the file. Installation went fairly straightforard:

root@blog# rpm -i MySQL-client-4.1.9-0.i386.rpm
warning: MySQL-client-4.1.9-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
root@blog# 

Not sure what all that signature complaining stuff was but whatever.

So, I hunted around to find where in the heck it put these files? Couldn't find'em. Okay, I'll just reinstall it and hunt around for last modified times.

root@blog# rpm -i MySQL-client-4.1.9-0.i386.rpm
warning: MySQL-client-4.1.9-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
        package MySQL-client-4.1.9-0 is already installed
root@blog# 

Oh, okay, no more installing for me. That's fine. Hmmm... so how can I find these files? I remember from the man page that rpm had a "verify" option -V. I'll try that.

root@blog#  rpm -V MySQL-client-4.1.9-0.i386.rpm
package MySQL-client-4.1.9-0.i386.rpm is not installed
root@blog# 

WHAT? But, -i told me it was cool? Why is -V saying it's not installed, but -i claims everything is fine. What the...

root@blog# rpm -i MySQL-client-4.1.9-0.i386.rpm
warning: MySQL-client-4.1.9-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
        package MySQL-client-4.1.9-0 is already installed
root@blog# rpm -V MySQL-client-4.1.9-0.i386.rpm
package MySQL-client-4.1.9-0.i386.rpm is not installed
root@blog# 

*Siggghhhh*

Someone has had to have ported apt-get to Red Hat.
Looking...
Found.

But, oh the irony! You have to install it via rpm!

[Mumbling under breath: "I know how this is going to end..."]

root@blog# rpm -i apt-0.5.15cnc6-1.1.fc3.fr.i386.rpm
warning: apt-0.5.15cnc6-1.1.fc3.fr.i386.rpm: V3 DSA signature: NOKEY, key ID e42d547b
error: Failed dependencies:
        libc.so.6(GLIBC_2.3.4) is needed by apt-0.5.15cnc6-1.1.fc3.fr
        librpm-4.3.so is needed by apt-0.5.15cnc6-1.1.fc3.fr
        librpmdb-4.3.so is needed by apt-0.5.15cnc6-1.1.fc3.fr
        librpmio-4.3.so is needed by apt-0.5.15cnc6-1.1.fc3.fr
        libselinux.so.1 is needed by apt-0.5.15cnc6-1.1.fc3.fr
        libstdc++.so.6(GLIBCXX_3.4) is needed by apt-0.5.15cnc6-1.1.fc3.fr

AAAAARRRRRRGGGGGGHHHHHHH!!!!!

You. Have got to be. Kidding. Me.

I am sooo not hunting down RPMs for each one of those libs only to discover they have 4 or 5 dependencies themselves.

So, something that would have taken me 15 minutes on Debian (and that's if I was only using one finger to type... and I was blindfolded) has taken me two hours to meet with failure.

I'll look at this again, tomorrow, maybe. But, please... please someone tell me I am being an idiot here and that there is a much easier way.

Right now, I would give half my kingdom for a Debian box.

Comments

  1. gravatar

    heck, I'd give a good 10% of my kingdom for a ports tree...

  2. gravatar

    yum:rpm::apt:dpkg

    Use yum on redhat/fedora/yellow dog, yast on suse or urpmi on on mandrake. I have no idea why people feel compelled to compare rpm to apt, its like comparing libc to an application.

    Also try to keep the number of package repositories used to a minumum.

  3. gravatar

    "WHAT? But, -i told me it was cool? Why is -V saying it's not installed, but -i claims everything is fine. What the..."

    Oh and when querying installed packegs use the package anme and not the package file.

    eg.
    rpm -V MySQL-client-4.1.9-0
    or
    rpm -V MySQL-client
    never
    rpm -V MySQL-client-4.1.9-0.i386.rpm

  4. gravatar

    i get the some error tho ..

    --
    eg.
    rpm -V MySQL-client-4.1.9-0
    or
    rpm -V MySQL-client
    never
    rpm -V MySQL-client-4.1.9-0.i386.rpm
    --
    is the same .. !

  5. gravatar

    After 12 hours trying to update mysql, I feel like you have had my rant for me - thankyou!

  6. gravatar

    Atually I haven't fix the problem with compiling jabber. So the error:

    checking for mysql.h in /usr/include/mysql... yes
    checking for mysql_init in -lmysqlclient... no
    configure: error: MySQL client libraries not found

    appears anyway.

    devel:/usr# dpkg-query -s mysql-client
    Package: mysql-client
    Status: install ok installed
    Priority: optional
    Section: misc
    Installed-Size: 64
    Maintainer: Christian Hammers
    Architecture: all
    Source: mysql-dfsg-5.0
    Version: 5.0.18-9
    Depends: mysql-client-5.0
    Description: mysql database client (current version)
    This is an empty package that depends on the current "best" version of
    mysql-client (currently mysql-client-5.0), as determined by the MySQL
    maintainers. Install this package if in doubt about which MySQL version
    you want, as this is the one we consider to be in the best shape.

    libmysqlclient.* are placed in /usr/lib

    Can you have any ideas about it.

Post a comment