Search code examples
installationshared-librariesopenwrt

Installing MySQL Client on OpenWRT


I'm looking for a way to install libmysqlclient on an OpenWRT (ver: Attitude Adjustment) wireless AP.

I've (finally) been able to successfully cross-compile a small C program for the AP, but when trying to install it I get an error indicating that the libmysqlclient dependency for my program cannot be satisfied.

Seems pretty obvious, right? Just install libmysqlclient and be done with it. If only I could figure out how to install the library...

Is it as simple as copying libmysqlclient (which I have on my main box) to the appropriate directory on the AP? OpenWRT uses opkg as a package manager but opkg has no idea what libmysqlclient is.

I'm afraid I'm a little out of my depth here and any guidance the community can provide would be greatly appreciated.

EDIT: Forgot to add that in my research I've found that there are other packages that can be installed on OpenWRT, such as MySQL, that rely on the library in question, so there must be a way to install it. The Makefile for MySQL found here (under libs -> mysql) indicates quite clearly that it is dependent on libmysqlclient.


Solution

  • Turns out it's just buried deep in the bowels of the internet. The following command will install libmysqlclient to your OpenWRT box:

    opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/libmysqlclient_5.1.68-1_ar71xx.ipk

    However, this lib depends on a couple others, all of which can be found at OpenWRT's opkg Repository.