PDA

View Full Version : Compile error: gsc_mysql.cpp:5:25: fatal error: mysql/mysql.h



Ni3ls
10th July 2020, 11:03
Hi all, long time no see!

I'm compiling libcod for cod2 again, but i run into this error:

##### COMPILE cod2_1_0 GSC_MYSQL.CPP #####
gsc_mysql.cpp:5:25: fatal error: mysql/mysql.h: No such file or directory
#include <mysql/mysql.h>



And later


##### LINKING libcod2_1_0.so #####
/usr/bin/ld: cannot find -lmysqlclient
collect2: error: ld returned 1 exit status


Somehow I'm not able to install this: libmysqlclient-dev:i386

Working on Debian 6 and using maxdamage's libcod

IzNoGoD
10th July 2020, 12:13
dpkg --add-architecture i386
apt-get update
apt-get install libmysqlclient-dev:i386

IzNoGoD
10th July 2020, 12:14
Also: you should really consider upgrading.

https://www.debian.org/News/2016/20160212

Ni3ls
15th July 2020, 14:14
after apt-get update


Err https://packages.sury.org jessie/main amd64 Packages
HttpError404
Get:91 https://packages.sury.org jessie/main i386 Packages
Err https://packages.sury.org jessie/main i386 Packages
HttpError404
Fetched 26.2 MB in 4s (5,568 kB/s)
W: Failed to fetch https://packages.sury.org/php/dists/jessie/main/binary-amd64/Packages HttpError404

W: Failed to fetch https://packages.sury.org/php/dists/jessie/main/binary-i386/Packages HttpError404

E: Some index files failed to download. They have been ignored, or old ones used instead.


and after apt-get install libmysqlclient-dev:i386


Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
libmysqlclient-dev:i386 : Depends: zlib1g-dev:i386 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.


So i guess i have to use a more stable debian version?

IzNoGoD
15th July 2020, 17:33
The mirror you're using for your libmysqlclient is updated. It does only have buster and stretch distro packages listed now.

Also, you were using a jessie package from there, while jessie is not the version of debian that you're running.

Update your server (best through a full reinstall at this point)

caldas
12th August 2020, 14:59
Debian 10?

apt install libmariadb-dev-compat:i386
apt install libmysqlclient-dev:i386