Issue with tmysql ( cannot open shared object file: No such file or directory)

I’ve had this issue for a while now with tmysql. My server has CentOS 6. Here is the error I get.

error loading module ‘tmysql’ from file ‘/home/gmod/srcds/orangebox/garrysmod/lua/includes/modules/gm_tmysql_linux.dll’: cannot open shared object file: No such file or directory

I’ve been googling this error for a day now but can not simply find a solution into it. I have found few useful posts

I’ve tried them both. I downloaded the libmysqlclient.a and made a symlink to it with name, no changes.
I downloaded the files AzuiSleet gave, took them to my /usr/lib64 folder and ran LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib ; export LD_LIBRARY_PATH, this did not help either.

I have the gm_tmysql_linux.dll and libmysql.dll downloaded from here.

Any help on what should I do?

You need the boost libraries and the libmysqlclient16 libraries. You also haven’t mentioned whether you’re using 32 or 64-bit.

I downloaded the boost libraries as told here.

I have and libmysqlclient.a in my /usr/lib64/mysql, though.

I am using 64-bit system.

I’m not sure if this only works for debian or ubuntu servers, but you could try this.

wget -c
mkdir mysql32
dpkg --extract libmysqlclient*deb mysql32
sudo mv mysql32/usr/lib/* /usr/lib32/

CentOS doesn’t seem to be using the dpkg, so that is not helping.

From what I’ve seen CentOS seems to be fairly incompatible with GMod’s portion of SRCDS. Did you put the two binaries in the same folder as srcds_run

Okay, they were not in the same folder with srcds_run, I moved them there and now the error is this.

error loading module ‘tmysql’ from file ‘/home/gmod/srcds/orangebox/garrysmod/lua/includes/modules/gm_tmysql_linux.dll’: wrong ELF class: ELFCLASS64

are you on a 64 bit system or something?

CentOS 6 64bit, yes.

You can try this,

Not sure if it will work, and I can’t remember how I fixed this on my box, sorry :frowning:

Thank you for all the help so far.

Even after downloading that and extracting it to the same folder with srcds_run, I get just slightly different error.

error loading module ‘tmysql’ from file ‘/home/gmod/srcds/orangebox/garrysmod/lua/includes/modules/gm_tmysql_linux.dll’:
./ invalid ELF header

Sorry for the delay, but I took these from my server, give them a shot (it’s also 64 bit) -

All the errors are gone, at least. The gamemode just doesn’t seem to be connecting to the MySQL, but I believe that’s related to the gamemode itself.

Thank you for these.

Sure thing, glad it’s working :smiley:

I have mostly the same problems, I got to the point where it was saying ./ invalid ELF header, then I tried your link, and now it loads up to the point where it tries to connect to a database, and then prints “Error connecting to DB:” and stops the srcds and restarts it, and will never connect

From what I have read and heard, CentOS is highly incompatible with srcds as a whole. You get much better results with debian based Linux Distros like Ubuntu or just regular Debian.

I seem to be having the same problem.

OS: ubuntu-11.10 64bit

Can anyone help me?

what is the “same problem”

Seems to be fixed now. Weird. I’ll let you know if I run into any more problems.