• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Linux ./theforgottenserver: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory

bury

Active Member
Joined
Jul 27, 2008
Messages
421
Solutions
7
Reaction score
25
Hello. I have migrated my server to a better one from the same hosting (OVH). I have used the same OS (Debian 9.5 stretch 64 bits) and If I try to execute my server I find this error:

./theforgottenserver: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory

I have tried some solutions I found in google but the error still appears. I'm using phpmyadmin for db. I'm using webmin as panel, where I installed apache and mysql. I installed phpmyadmin via ssh (putty).

I copied the old files to my computer via Filezilla, and with Filezilla too, pasted into the new server (www/html/ for website and /home/ for datapack).

I dont know where is the problem.

Thanks in advance.
 
Solution
After lot of lines:

configure: error: "Linking against mysql-client failed."

Maybe I have to change something in this line too?

  • ./autogen.sh && ./configure --enable-sqlite --enable-mysql --enable-root-permission --enable-server-diag && ./build.sh
Ok... I managed to install a mysql default package and tried to compile again.... Now new lines appeared, and some different font colors etc... but after ./build.sh I get these errors:

Makefile:547: fallo en las instrucciones para el objetivo 'protocolgame.o' <<<< translate: fail in the instructions for the objetive 'protocolgame.'
make[1]: se sale del directorio '/root/3777-master/src' <<<<< translate: exit from directory
Makefile:404: fallo en las...
have you installed the libs ?

Code:
apt-get install

libboost1.41-dev libboost-system1.41-dev libboost-filesystem1.41-dev
libboost-date-time1.41-dev libboost-regex1.41-dev libboost-thread1.41-dev
libgmp3-dev liblua5.1-0 liblua5.1-0-dev liblua50 liblua50-dev liblualib50
liblualib50-dev lua50 lua5.1 libsqlite0-dev libsqlite3-dev sqlite3
libmysql++-dev libmysqlclient-dev mysql-client-5.1 mysql-server-5.1
mysql-common libxml2-dev libxml++2.6-dev cpp gcc g++ make automake
autoconf pkg-config subversion liblua5.1-sql-mysql-dev
liblua5.1-sql-sqlite3-dev zlib1g-dev zlib1g libcrypto++-dev libcrypto++8
 
Sorry for my noobism in Linux GNU but how I put these commands? If I put only apt-get install it says everything ok (0 update, 0 installed, 0 deleted, 0 no updated).

If I paste apt-get install and the first line libbost1.41-dev.... :


E: No se ha podido localizar el paquete libboost1.41-dev
E: No se pudo encontrar ningún paquete usando «*» con «libboost1.41-dev»
E: No se pudo encontrar ningún paquete con la expresión regular «libboost1.41-dev»
E: No se ha podido localizar el paquete libboost-system1.41-dev
E: No se pudo encontrar ningún paquete usando «*» con «libboost-system1.41-dev»
E: No se pudo encontrar ningún paquete con la expresión regular «libboost-system1.41-dev»
E: No se ha podido localizar el paquete libboost-filesystem1.41-dev
E: No se pudo encontrar ningún paquete usando «*» con «libboost-filesystem1.41-dev»
E: No se pudo encontrar ningún paquete con la expresión regular «libboost-filesystem1.41-dev»

it says in spanish "it couldnt locate the paquet etc etc

I could install this one:

libgmp3-dev liblua5.1-0 liblua5.1-0-dev liblua50 liblua50-dev liblualib50
 
Last edited:
Sorry for my noobism in Linux GNU but how I put these commands? If I put only apt-get install it says everything ok (0 update, 0 installed, 0 deleted, 0 no updated).

If I paste apt-get install and the first line libbost1.41-dev.... :


E: No se ha podido localizar el paquete libboost1.41-dev
E: No se pudo encontrar ningún paquete usando «*» con «libboost1.41-dev»
E: No se pudo encontrar ningún paquete con la expresión regular «libboost1.41-dev»
E: No se ha podido localizar el paquete libboost-system1.41-dev
E: No se pudo encontrar ningún paquete usando «*» con «libboost-system1.41-dev»
E: No se pudo encontrar ningún paquete con la expresión regular «libboost-system1.41-dev»
E: No se ha podido localizar el paquete libboost-filesystem1.41-dev
E: No se pudo encontrar ningún paquete usando «*» con «libboost-filesystem1.41-dev»
E: No se pudo encontrar ningún paquete con la expresión regular «libboost-filesystem1.41-dev»

it says in spanish "it couldnt locate the paquet etc etc

I could install this one:

libgmp3-dev liblua5.1-0 liblua5.1-0-dev liblua50 liblua50-dev liblualib50

run apt-cache search libboost and you should see which version of boost is available on your system
after that replace 1.41 with the version you found with apt-cache search
 
run apt-cache search libboost and you should see which version of boost is available on your system
after that replace 1.41 with the version you found with apt-cache search

I got this...

Code:
apt-cache search libboost
libboost-date-time1.62.0 - Conjunto de bibliotecas de fechas basadas en concepto                                                                                                                                                             s de programación genéricos
libboost-date-time1.62-dev - Conjunto de bibliotecas de fechas basadas en concep                                                                                                                                                             tos de programación genéricos
libboost-filesystem1.62.0 - Operaciones de sistema de archivos (rutas adaptables                                                                                                                                                             , iteración sobre directorios, etc) en C++
libboost-filesystem1.62-dev - Operaciones de sistema de archivos (rutas adaptabl                                                                                                                                                             es, iteración sobre directorios, etc) en C++
libboost-graph1.62.0 - Componentes y algoritmos de grafos genéricos de C++
libboost-graph1.62-dev - Componentes y algoritmos de grafos genéricos de C++
libboost-iostreams1.62.0 - biblioteca Boost.Iostreams
libboost-iostreams1.62-dev - Archivos de desarrollo de la biblioteca Boost.Iostr                                                                                                                                                             eams
libboost-program-options1.62.0 - Biblioteca de opciones de programa para C++
libboost-program-options1.62-dev - Biblioteca de opciones de programa para C++
libboost-python1.62-dev - Archivos de desarrollo de la biblioteca Boost.Python
libboost-regex1.62.0 - Biblioteca de expresiones regulares de C++
libboost-regex1.62-dev - Biblioteca de expresiones regulares de C++
libboost-signals1.62.0 - Gestión de señales y biblioteca de ranuras para C++
libboost-signals1.62-dev - Gestión de señales y biblioteca de ranuras para C++
libboost-system1.62.0 - Biblioteca del sistema operativo (p. ej. permite realiza                                                                                                                                                             r diagnósticos)
libboost-system1.62-dev - Biblioteca del sistema operativo (p. ej. permite reali                                                                                                                                                             zar diagnósticos)
libboost-test1.62.0 - Componentes para escribir y ejecutar conjuntos de pruebas
libboost-test1.62-dev - Componentes para escribir y ejecutar conjuntos de prueba                                                                                                                                                             s
libboost-thread1.62.0 - C++ adaptable y multihilo
libboost-thread1.62-dev - C++ adaptable y multihilo
libboost-wave1.62.0 - Biblioteca del preprocesador C99/C++
libboost-wave1.62-dev - Biblioteca del preprocesador C99/C++
libboost-all-dev - Boost C++ Libraries development files (ALL) (default version)
libboost-atomic-dev - atomic data types, operations, and memory ordering constra                                                                                                                                                             ints (default version)
libboost-chrono-dev - C++ representation of time duration, time point, and clock                                                                                                                                                             s (default version)
libboost-context-dev - provides a sort of cooperative multitasking on a single t                                                                                                                                                             hread (default version)
libboost-coroutine-dev - provides a sort of cooperative multitasking on a single                                                                                                                                                              thread (default version)
libboost-date-time-dev - set of date-time libraries based on generic programming                                                                                                                                                              concepts (default version)
libboost-dev - Boost C++ Libraries development files (default version)
libboost-doc - Boost.org libraries documentation (default version)
libboost-exception-dev - library to help write exceptions and handlers (default                                                                                                                                                              version)
libboost-fiber-dev - cooperatively-scheduled micro-/userland-threads (default ve                                                                                                                                                             rsion)
libboost-filesystem-dev - filesystem operations (portable paths, iteration over                                                                                                                                                              directories, etc) in C++ (default version)
libboost-graph-dev - generic graph components and algorithms in C++ (default ver                                                                                                                                                             sion)
libboost-graph-parallel-dev - generic graph components and algorithms in C++ (de                                                                                                                                                             fault version)
libboost-iostreams-dev - Boost.Iostreams Library development files (default vers                                                                                                                                                             ion)
libboost-locale-dev - C++ facilities for localization (default version)
libboost-log-dev - C++ logging library (default version)
libboost-math-dev - Boost.Math Library development files (default version)
libboost-mpi-dev - C++ interface to the Message Passing Interface (MPI) (default                                                                                                                                                              version)
libboost-mpi-python-dev - C++ interface to the Message Passing Interface (MPI),                                                                                                                                                              Python Bindings (default version)
libboost-program-options-dev - program options library for C++ (default version)
libboost-python-dev - Boost.Python Library development files (default version)
libboost-random-dev - Boost Random Number Library (default version)
libboost-regex-dev - regular expression library for C++ (default version)
libboost-serialization-dev - serialization library for C++ (default version)
libboost-signals-dev - managed signals and slots library for C++ (default versio                                                                                                                                                             n)
libboost-system-dev - Operating system (e.g. diagnostics support) library (defau                                                                                                                                                             lt version)
libboost-test-dev - components for writing and executing test suites (default ve                                                                                                                                                             rsion)
libboost-thread-dev - portable C++ multi-threading (default version)
libboost-timer-dev - C++ wall clock and CPU process timers (default version)
libboost-tools-dev - Boost C++ Libraries development tools (default version)
libboost-type-erasure-dev - C++ runtime polymorphism based on concepts (default                                                                                                                                                              version)
libboost-wave-dev - C99/C++ preprocessor library (default version)
libboost-atomic1.62-dev - atomic data types, operations, and memory ordering con                                                                                                                                                             straints
libboost-atomic1.62.0 - atomic data types, operations, and memory ordering const                                                                                                                                                             raints
libboost-chrono1.62-dev - C++ representation of time duration, time point, and c                                                                                                                                                             locks
libboost-chrono1.62.0 - C++ representation of time duration, time point, and clo                                                                                                                                                             cks
libboost-context1.62-dev - provides a sort of cooperative multitasking on a sing                                                                                                                                                             le thread
libboost-context1.62.0 - provides a sort of cooperative multitasking on a single                                                                                                                                                              thread
libboost-coroutine1.62-dev - provides a sort of cooperative multitasking on a si                                                                                                                                                             ngle thread
libboost-coroutine1.62.0 - provides a sort of cooperative multitasking on a sing                                                                                                                                                             le thread
libboost-exception1.62-dev - library to help write exceptions and handlers
libboost-fiber1.62-dev - cooperatively-scheduled micro-/userland-threads
libboost-fiber1.62.0 - cooperatively-scheduled micro-/userland-threads
libboost-graph-parallel1.62-dev - generic graph components and algorithms in C++
libboost-graph-parallel1.62.0 - generic graph components and algorithms in C++
libboost-locale1.62-dev - C++ facilities for localization
libboost-locale1.62.0 - C++ facilities for localization
libboost-log1.62-dev - C++ logging library
libboost-log1.62.0 - C++ logging library
libboost-math1.62-dev - Boost.Math Library development files
libboost-math1.62.0 - Boost.Math Library
libboost-mpi-python1.62-dev - C++ interface to the Message Passing Interface (MP                                                                                                                                                             I), Python Bindings
libboost-mpi-python1.62.0 - C++ interface to the Message Passing Interface (MPI)                                                                                                                                                             , Python Bindings
libboost-mpi1.62-dev - C++ interface to the Message Passing Interface (MPI)
libboost-mpi1.62.0 - C++ interface to the Message Passing Interface (MPI)
libboost-python1.62.0 - Boost.Python Library
libboost-random1.62-dev - Boost Random Number Library
libboost-random1.62.0 - Boost Random Number Library
libboost-serialization1.62-dev - serialization library for C++
libboost-serialization1.62.0 - serialization library for C++
libboost-timer1.62-dev - C++ wall clock and CPU process timers
libboost-timer1.62.0 - C++ wall clock and CPU process timers
libboost-type-erasure1.62-dev - C++ runtime polymorphism based on concepts
libboost-type-erasure1.62.0 - C++ runtime polymorphism based on concepts
libboost1.62-all-dev - Boost C++ Libraries development files (ALL)
libboost1.62-dev - Boost C++ Libraries development files
libboost1.62-doc - Boost.org libraries documentation
libboost1.62-tools-dev - Boost C++ Libraries development tools
libboost-geometry-utils-perl - Perl module providing bindings to the Boost Geome

Thanks again for your help...
 
ok so apt-get install libboost1.62-dev ... and so on

Ok, it says I have all installed until these 3:

apt-get install libmysql++-dev libmysqlclient-dev mysql-client-5.1 mysql-server-5.1

Errors:

E: El paquete «libmysqlclient-dev» no tiene un candidato para la instalación
E: No se ha podido localizar el paquete mysql-client-5.1
E: No se pudo encontrar ningún paquete usando «*» con «mysql-client-5.1»
E: No se pudo encontrar ningún paquete con la expresión regular «mysql-client-5.1»
E: No se ha podido localizar el paquete mysql-server-5.1
E: No se pudo encontrar ningún paquete usando «*» con «mysql-server-5.1»
E: No se pudo encontrar ningún paquete con la expresión regular «mysql-server-5.1»

autoconf pkg-config subversion liblua5.1-sql-mysql-dev

Errors:

E: No se ha podido localizar el paquete liblua5.1-sql-mysql-dev
E: No se pudo encontrar ningún paquete usando «*» con «liblua5.1-sql-mysql-dev»
E: No se pudo encontrar ningún paquete con la expresión regular «liblua5.1-sql-mysql-dev»

liblua5.1-sql-sqlite3-dev zlib1g-dev zlib1g libcrypto++-dev libcrypto++8

Errors:

E: No se ha podido localizar el paquete liblua5.1-sql-sqlite3-dev
E: No se pudo encontrar ningún paquete usando «*» con «liblua5.1-sql-sqlite3-dev»
E: No se pudo encontrar ningún paquete con la expresión regular «liblua5.1-sql-sqlite3-dev»
E: No se ha podido localizar el paquete libcrypto++8
E: No se pudo encontrar ningún paquete con la expresión regular «libcrypto++8»


-----

If you want i can config it in English but idk how to do it. it says the same in spanish "couldn't locate the package xxxx or yyyy".

The others libs or they were installed yet, or I installed them without problem.
 
Last edited:
@Don Daniello

But is this tfs 0.4? My server is an 8.6. I have compiled it properly. This appeared on root/forgottenserver:

root.jpg


Where is the executable?

My server is located on: /home/server/ ; Should I copy all libs there?

Tried to execute my server again and it gives same problem.

EDIT: In the tutorial you shared with me, Don Daniello, it says this: "Replace libmysqlclient-dev with libmariadbclient-dev on Debian 9 and above. "; I think my problem is about this. My last dedicated was debian 9.5 and this has 9.4...

Indeed, I think this is not 0.4 for 8.6 lol :S
 
Last edited:
that's the most popular 0.4 for 8.6
compiling instructions at the bottom. Again, for debian 9+ change libmysqlclient-dev for libmariadbclient-dev

After lot of lines:

configure: error: "Linking against mysql-client failed."

Maybe I have to change something in this line too?

  • ./autogen.sh && ./configure --enable-sqlite --enable-mysql --enable-root-permission --enable-server-diag && ./build.sh
Ok... I managed to install a mysql default package and tried to compile again.... Now new lines appeared, and some different font colors etc... but after ./build.sh I get these errors:

Makefile:547: fallo en las instrucciones para el objetivo 'protocolgame.o' <<<< translate: fail in the instructions for the objetive 'protocolgame.'
make[1]: se sale del directorio '/root/3777-master/src' <<<<< translate: exit from directory
Makefile:404: fallo en las instrucciones para el objetivo 'all' <<<< translate: fail in the instructions for the objetive 'all'
make: *** [all] Error 2

And some errors like this:

usr/include/c++/6/complex:526:5: note: template argument deduction/substitution failed:
talkaction.cpp:243:15: note: âstd::stringstream {aka std::__cxx11::basic_stringstream<char>}â is not derived from âconst std::complex<_Tp>â
ss << sl << "...";
^~
In file included from /usr/include/boost/detail/container_fwd.hpp:96:0,
from /usr/include/boost/functional/hash/extensions.hpp:22,
from /usr/include/boost/functional/hash/hash.hpp:560,
from /usr/include/boost/functional/hash.hpp:6,
from /usr/include/boost/regex/v4/basic_regex.hpp:23,
from /usr/include/boost/regex/v4/regex.hpp:67,
from /usr/include/boost/regex.hpp:31,
from otpch.h:36,
from talkaction.cpp:17:


So it's failing compiling idk why.... and Idk why my last executable doesnt work since I think we compiled it with libmariadbclient-dev, since my other dedicated server was debian 9.5 lol

Screenshot of the error:

error1.jpg
 
Last edited:
After lot of lines:

configure: error: "Linking against mysql-client failed."

Maybe I have to change something in this line too?

  • ./autogen.sh && ./configure --enable-sqlite --enable-mysql --enable-root-permission --enable-server-diag && ./build.sh
Ok... I managed to install a mysql default package and tried to compile again.... Now new lines appeared, and some different font colors etc... but after ./build.sh I get these errors:

Makefile:547: fallo en las instrucciones para el objetivo 'protocolgame.o' <<<< translate: fail in the instructions for the objetive 'protocolgame.'
make[1]: se sale del directorio '/root/3777-master/src' <<<<< translate: exit from directory
Makefile:404: fallo en las instrucciones para el objetivo 'all' <<<< translate: fail in the instructions for the objetive 'all'
make: *** [all] Error 2

And some errors like this:

usr/include/c++/6/complex:526:5: note: template argument deduction/substitution failed:
talkaction.cpp:243:15: note: âstd::stringstream {aka std::__cxx11::basic_stringstream<char>}â is not derived from âconst std::complex<_Tp>â
ss << sl << "...";
^~
In file included from /usr/include/boost/detail/container_fwd.hpp:96:0,
from /usr/include/boost/functional/hash/extensions.hpp:22,
from /usr/include/boost/functional/hash/hash.hpp:560,
from /usr/include/boost/functional/hash.hpp:6,
from /usr/include/boost/regex/v4/basic_regex.hpp:23,
from /usr/include/boost/regex/v4/regex.hpp:67,
from /usr/include/boost/regex.hpp:31,
from otpch.h:36,
from talkaction.cpp:17:


So it's failing compiling idk why.... and Idk why my last executable doesnt work since I think we compiled it with libmariadbclient-dev, since my other dedicated server was debian 9.5 lol

Screenshot of the error:

error1.jpg

Check this out:
 
Solution
Check this out:

I've fixed the protocolgame.cpp one. Then I have the talkaction.cpp problem. At first it said line 233, and then line 243. Fixed them both:


233: sl.str() << ss;
243: ss << sl.str() << "...";

When I first fixed 233, it only gave me the error of the 243. Then I replace sl with sl.str() and it gave me again the 233 error lol:


Code:
/usr/include/c++/6/ostream:502:5: note:   template argument deduction/substitution failed:

talkaction.cpp:233:20: note:   âstd::__cxx11::basic_stringstream<char>::__string_type {aka std::__cxx11::basic_string<char>}â is not derived from âstd::basic_ostream<_CharT, _Traits>â

        sl.str() << ss;

                    ^~

In file included from /usr/include/c++/6/iterator:64:0,

                 from /usr/include/boost/regex/v4/regex_workaround.hpp:32,

                 from /usr/include/boost/regex/v4/regex.hpp:32,

                 from /usr/include/boost/regex.hpp:31,

                 from otpch.h:36,

                 from talkaction.cpp:17:

Ok, I wrote in the 233 line instead ss, ss.str() and it worked lol. The executable worked and I copied it into my original datapack folder and it started up without problem. 0 errors atm... im testing everything...

Thanks everyone.
 
Last edited:
Back
Top