Previous Thread
Next Thread
Print Thread
Unable to load libashmysql #31083 07 Jul 10 10:47 AM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
Quote

Dear MicroSabio,

I'm trying to install the A-Shell/SQL connector for MySQL under Linux (using A-Shell 5.1.1182), but when I test it using the sqltest1.run program, I get the following:
Code
SQLTEST1 - Verify existence of A-Shell/SQL connector and database client library
 
Warning: Minimum connector version for this A-Shell version is 1.3
(Earlier connectors may be too incompatible to even report their version)

Select database connector (1=MySQL,2=ODBC) [1] 1

Using connector MySQL (native)

Loading connector and client library...%Unable to load libashmysql:

   libmysqlclient.so.16: cannot open shared object file: No such file or directory
 [Unable to link SQL library]
Connector or client library failed to load.

If cause is not clear from error(s) list above, consult the
troubleshooting section in the A-Shell/SQL documentation.

%Unable to load libashmysql:

   libmysqlclient.so.16: cannot open shared object file: No such file or directory
Code
$ ls /vm/miame/bin/lib* -la

-rwxrw-rw- 1 ashell users 18468 Jul  6 14:53 libashmysql.so.1.3.119

$ ls /usr/lib/libas* -la
lrwxrwxrwx 1 root root     40 Jul  6 14:57 libashmysql.so.1 -> /eis/vm/miame/bin/libashmysql.so.1.3.119
Here are a few troubleshooting ideas /suggestions that come to mind:

1. Your libashmysql.so.1.3.119 module is executable only by its owner. Without knowing how the ashell executable is owned or launched, I would suspect that could be a problem. Either use chmod 777 libashmysql.so.1.3.119 on it (the lazy way), or review your ashell ownership rules to make sure everything is consistent. (For example, if you use chmod +s ashell, then all the libraries should be executable for the the ashell owner and group.)

2. You may be missing the libmysqlclient library module. See the Troubleshooting Section in the A-Shell SQL Reference for some mention of that. (Also see Installing MySQL .)

3. Use the ldd utility to check the whether all the modules needed by the libashmysql.so.1 library are available. Here's what that reports on my system:

Code
[root@centos bin]# ldd /usr/lib libashmysql.so.1                          
        libc.so.6 => /lib/tls/libc.so.6 (0x00111000)                      
        libmysqlclient.so.16 => /usr/lib/libmysqlclient.so.16 (0x00acf000)
        /lib/ld-linux.so.2 (0x00291000)                                   
        libpthread.so.0 => /lib/tls/libpthread.so.0 (0x0023c000)          
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x0024e000)                  
        libnsl.so.1 => /lib/libnsl.so.1 (0x0093b000)                      
        libm.so.6 => /lib/tls/libm.so.6 (0x005e9000)                      
        libz.so.1 => /usr/lib/libz.so.1 (0x003ef000)                      
4. If all of the above is in order, then my suspicion would turn to the question of whether A-Shell was having trouble locating the /usr/lib/libashmysql.so.1 module. It would be highly unusual for /usr/lib to not be in the library loading path (which is why we recommended that you put the library there). But a quick search on ldconfig and/or linux library path should lead you to some reading on the subject. There are multiple ways to control the library loading path, but the most standard is to add any non-standard paths to /etc/ld/so.conf and then use ldconfig to process it. But /lib and /usr/lib are not generally listed there because they are automatically in the path. But maybe some digging on the Internet relating to that problem will turn up some further ideas.

Let us know what you find...

Re: Unable to load libashmysql #31084 07 Jul 10 11:23 AM
Joined: Jun 2001
Posts: 410
V
Valli Information Systems Offline
Member
Offline
Member
V
Joined: Jun 2001
Posts: 410
It may be that i'm using an older version of mysql (5.0) as i do not have the libmysqlclient.so.16 on the system, but do have libmysqlclient.so. this is a redhat el5 system, anyone know if i need to update mysql or can i just install the new client?

thanks

Re: Unable to load libashmysql #31085 07 Jul 10 11:41 AM
Joined: Nov 2006
Posts: 2,192
S
Stephen Funkhouser Online Content
Member
Online Content
Member
S
Joined: Nov 2006
Posts: 2,192
I've recently setup a new CentOS 5.4 64 bit box, and it has the following MySql .rpm's installed

Code
[root@kkvet0 ~]# rpm -qa | grep -i mysql
mysql-administrator-5.0r12-1rhel4
mysql-gui-tools-5.0r12-1rhel4
mysql-5.0.77-4.el5_4.2
php-mysql-5.2.10-1.el5.centos
mysql-server-5.0.77-4.el5_4.2
mysql-query-browser-5.0r12-1rhel4
perl-DBD-mysql-4.014-1.el5.rf
In order, to get A-Shell using MySQL I copied over the libmyclient.so.16 files from my old box to /usr/lib/

Jack I think I emailed you the libmysqlclient_16.tar.gz file for that? If not I'll resend it, so you can pass it on just let me know.


Stephen Funkhouser
Diversified Data Solutions
Re: Unable to load libashmysql #31086 08 Jul 10 10:18 AM
Joined: Jun 2001
Posts: 410
V
Valli Information Systems Offline
Member
Offline
Member
V
Joined: Jun 2001
Posts: 410
i downloaded and installed the following and it seems i can continue on.

thanks all

http://rpm.pbone.net/index.php3/sta...hared-compat-6.0.9-0.rhel5.i386.rpm.html

Re: Unable to load libashmysql #31087 09 Jul 10 02:09 PM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
Although it sounds like you've moved beyond it, for future reference, I posted the libmysqlclient_16.tar.gz file in http://www.microsabio.net/dist/other/asql/

Thanks Stephen for the file and for the reminder.

Re: Unable to load libashmysql #31088 06 Oct 14 02:55 PM
Joined: Nov 2006
Posts: 2,192
S
Stephen Funkhouser Online Content
Member
Online Content
Member
S
Joined: Nov 2006
Posts: 2,192
Just to provide a trail for future Centos 6/MySQl upgraders. Here's a link to a 32 bit version of the MySQL shared compatibility library for CentOS 6 64-bit and MySQL 5.5

MySQL-shared-compat-5.5.40-1.el6.i686.rpm


Stephen Funkhouser
Diversified Data Solutions
Re: Unable to load libashmysql #31089 24 May 16 10:38 AM
Joined: Nov 2006
Posts: 2,192
S
Stephen Funkhouser Online Content
Member
Online Content
Member
S
Joined: Nov 2006
Posts: 2,192
FYI, these MySQL-shared-compat 32-bit rpm files don't install anymore due to incompatibilities with other packages. Unfortunately, I can't find any others to use.

I did find libmysqlclient_16-5.1.73.tz on the MicroSabio download site. After extracting those to my /usr/lib/ I had to use ldd to see missing dependencies, and then use "yum provides " to find the yum packages that need to be installed.

It seems like this is only going to be more of a pain going forward. Is it time to make a compatible 64-bit libashmysql?


Stephen Funkhouser
Diversified Data Solutions
Re: Unable to load libashmysql #31090 25 May 17 03:39 PM
Joined: Jun 2001
Posts: 410
V
Valli Information Systems Offline
Member
Offline
Member
V
Joined: Jun 2001
Posts: 410
did you ever get a 64-bit compatible libashmysql? i'm trying to install this on a centos 6.8 server which only has 64 bit libaries on it and i just keep chasing one error after another

thanks

Re: Unable to load libashmysql #31091 25 May 17 03:48 PM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
Although I've started working on a 64 bit version of A-Shell (primarily motivated by the need for a 64 bit version of the libashodbc connector which is needed for compatibility with the 64-bit-only MSODBC driver for SQL Server), there are still several obstacles to overcome. (Among others, note that it's all-or-nothing, i.e. to use a 64 bit library, the parent application and all of the other libraries have to be 64 bit.)

In the meantime though, there is no reason I can see why you can't use the 32 bit libashmysql, provided you install the necessary 32 bit prerequisite libraries. (It sounds like you've fallen into package-dependency-hell in attempting that.) I don't have a 6.8 CentOS system with MySQL on it handy, by I'll see if I can put that together in the next day or so and verify that it works.

Re: Unable to load libashmysql #31092 25 May 17 04:03 PM
Joined: Jun 2001
Posts: 410
V
Valli Information Systems Offline
Member
Offline
Member
V
Joined: Jun 2001
Posts: 410
back to purgatory then, thank

Re: Unable to load libashmysql #31093 25 May 17 04:24 PM
Joined: Jun 2001
Posts: 410
V
Valli Information Systems Offline
Member
Offline
Member
V
Joined: Jun 2001
Posts: 410
was trying to use the libmysqlclient_16-5.1.73, kept give missing segmentation fault, finally went back to the .34 and success!

Re: Unable to load libashmysql #31094 25 May 17 05:06 PM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
That's a positive sign. It might also be useful to others to post the output of:

$ ldd /usr/lib/libashmysql.so.1
$ uname -a

so we can see the full library dependency chain and kernel info.

Re: Unable to load libashmysql #31095 25 May 17 07:37 PM
Joined: Jun 2001
Posts: 410
V
Valli Information Systems Offline
Member
Offline
Member
V
Joined: Jun 2001
Posts: 410
what and deprive them of this fun experience?

[oedwards@valli-prod1 mysql]$ ldd /usr/lib/libashmysql.so.1
linux-gate.so.1 => (0x004d3000)
libc.so.6 => /lib/libc.so.6 (0x0027b000)
libmysqlclient.so.16 => /usr/lib/libmysqlclient.so.16 (0x00a97000)
/lib/ld-linux.so.2 (0x0025b000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00fbd000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x00199000)
libnsl.so.1 => /lib/libnsl.so.1 (0x001c9000)
libm.so.6 => /lib/libm.so.6 (0x001e4000)
libz.so.1 => /lib/libz.so.1 (0x00945000)
libfreebl3.so => /lib/libfreebl3.so (0x00cd8000)
libdl.so.2 => /lib/libdl.so.2 (0x0020e000)
[oedwards@valli-prod1 mysql]$ ibc.so.6 => /lib/libc.so.6^C
[oedwards@valli-prod1 mysql]$ uname -a
Linux valli-prod1.valli.com 2.6.32-642.11.1.el6.x86_64 #1 SMP Fri Nov 18 19:25:0
5 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Re: Unable to load libashmysql #31096 26 May 17 10:56 AM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
Just so you don't run out of fun before the weekend is up, I've refreshed/recompiled/relinked A-Shell/Linux under CentOS 6.9, along with the ASQL/MySQL connector, which is now version 1.4.141. You can download the from the 64rel/bin-linux-el6 download directory . This seems to work with the 5.1.73 MySQL packages (and I have reason to believe also support the MySQL 5.7 packages).

This system already had the 64 bit MySQL packages installed; all I did to was to add the 32 bit mysql-devel package using:

Code
$ sudo yum install mysql-devel.i686
Maybe because I'm such a good person :rolleyes: that all went smooth as silk, with all the prerequisites identified and installed together.

After copying the libashmysql.so.1.4.141 to the bin directory and creating the symbolic link from /usr/bin/libashmysql.so.1, it all looks like this now:

Code
$ uname -a
Linux centos69.ashnet.net 2.6.32-696.el6.x86_64 #1 SMP Tue Mar 21 19:29:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

$ rpm -aq | grep mysql
mysql-5.1.73-8.el6_8.x86_64
mysql-devel-5.1.73-8.el6_8.i686
mysql-devel-5.1.73-8.el6_8.x86_64
mysql-libs-5.1.73-8.el6_8.x86_64
mysql-libs-5.1.73-8.el6_8.i686

$ ldd /usr/lib/libashmysql.so.1
        linux-gate.so.1 =>  (0x00d5f000)
        libc.so.6 => /lib/libc.so.6 (0x008c2000)
        libmysqlclient.so.16 => /usr/lib/mysql/libmysqlclient.so.16 (0x00734000)
        /lib/ld-linux.so.2 (0x002a0000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x001c6000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x006da000)
        libm.so.6 => /lib/libm.so.6 (0x001f6000)
        libssl.so.10 => /usr/lib/libssl.so.10 (0x00220000)
        libcrypto.so.10 => /usr/lib/libcrypto.so.10 (0x002c0000)
        libz.so.1 => /lib/libz.so.1 (0x00e19000)
        libfreebl3.so => /lib/libfreebl3.so (0x00289000)
        libgssapi_krb5.so.2 => /lib/libgssapi_krb5.so.2 (0x00f77000)
        libkrb5.so.3 => /lib/libkrb5.so.3 (0x004ed000)
        libcom_err.so.2 => /lib/libcom_err.so.2 (0x0028d000)
        libk5crypto.so.3 => /lib/libk5crypto.so.3 (0x0048b000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x00c03000)
        libdl.so.2 => /lib/libdl.so.2 (0x00292000)
        libkrb5support.so.0 => /lib/libkrb5support.so.0 (0x004b6000)
        libkeyutils.so.1 => /lib/libkeyutils.so.1 (0x00297000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x004c2000)
        libselinux.so.1 => /lib/libselinux.so.1 (0x00e78000)
And just to verify that the library loads...

Code
$ ashell log sql:

.ver
              -- A-Shell Version 6.4.1550.5 Up and Running --

.run sqltest1
SQLTEST1 - Verify existence of A-Shell/SQL connector and database client library


Warning: Minimum connector version for this A-Shell version is 1.3
(Earlier connectors may be too incompatible to even report their version)

Select database connector (1=MySQL,2=ODBC) [1] 1

Using connector MySQL (native)
Loading connector and client library... [OK]
Initializing connection handle...       [OK]
Client database library version:        5.1.73

A-Shell/SQL connector and DBMS client library successfully loaded

Connector ID (lib name)                 LIBASHMYSQL
Connector Version                       1401410 (1.4.141.0)
Connector Description:                  MySQL 5.7 (native)
.
Note the description says MySQL 5.7, which may be a bit misleading here given that the actual version installed is only 5.1. But it's meant to indicate that the the libashmysql connector is compiled/linked to be compatible with MySQL thru 5.7. The this same connector does in fact load ok under my CentOS 7 system:

Code
$ uname -a
Linux localhost.localdomain 3.10.0-327.28.3.el7.x86_64 #1 SMP Thu Aug 18 19:05:49 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

$ rpm -aq | grep mysql
pcp-pmda-mysql-3.10.6-2.el7.x86_64
mysql-community-devel-5.7.17-1.el7.i686
mysql-community-client-5.7.17-1.el7.i686
mysql57-community-release-el7-11.noarch
mysql-community-libs-5.7.17-1.el7.i686

$ ldd /usr/lib/libashmysql.so.1
        linux-gate.so.1 =>  (0xf7748000)
        libc.so.6 => /lib/libc.so.6 (0xf755c000)
        libmysqlclient.so.16 => /usr/lib/mysql/libmysqlclient.so.16 (0xf73e6000)
        /lib/ld-linux.so.2 (0xf7749000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0xf73b6000)
        libnsl.so.1 => /lib/libnsl.so.1 (0xf739c000)
        libm.so.6 => /lib/libm.so.6 (0xf7359000)
        libssl.so.10 => /lib/libssl.so.10 (0xf72f4000)
        libcrypto.so.10 => /lib/libcrypto.so.10 (0xf7129000)
        libz.so.1 => /lib/libz.so.1 (0xf7112000)
        libfreebl3.so => /lib/libfreebl3.so (0xf710e000)
        libgssapi_krb5.so.2 => /lib/libgssapi_krb5.so.2 (0xf70c4000)
        libkrb5.so.3 => /lib/libkrb5.so.3 (0xf6ff2000)
        libcom_err.so.2 => /lib/libcom_err.so.2 (0xf6fed000)
        libk5crypto.so.3 => /lib/libk5crypto.so.3 (0xf6fba000)
        libresolv.so.2 => /lib/libresolv.so.2 (0xf6fa0000)
        libdl.so.2 => /lib/libdl.so.2 (0xf6f9b000)
        libkrb5support.so.0 => /lib/libkrb5support.so.0 (0xf6f8b000)
        libkeyutils.so.1 => /lib/libkeyutils.so.1 (0xf6f86000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xf6f6c000)
        libselinux.so.1 => /lib/libselinux.so.1 (0xf6f48000)
        libpcre.so.1 => /lib/libpcre.so.1 (0xf6ee4000)
        liblzma.so.5 => /lib/liblzma.so.5 (0xf6eb9000)
Enjoy!


Moderated by  Jack McGregor, Ty Griffin 

Powered by UBB.threads™ PHP Forum Software 7.7.3