Solution to the "Shared Object Lib Not Found" Error on the Putty Screen
One of the frequently encountered errors when starting Metin2 PVP servers via Putty (SSH) is "Shared object 'lib...' not found, required by 'game'" It is a warning. This error occurs when the game's main executable files (game and db binary) cannot find the 32-bit compatibility libraries or special source code libraries it needs in the FreeBSD operating system, completely preventing the server from starting. You can follow the steps below to solve the problem.
Method 1: Manually Uploading the Missing Library to the Server
The error message usually clearly states the name of the missing file (Ex:libmd.so.5,libssl.so.10,libstdc++.so.6etc.). Manually introducing this file to the system is the most definitive solution:
- First, obtain the `.so` file mentioned in the error message from a secure source on the internet or from another running Metin2 server.
- Connect to your server with Filezilla or WinSCP.
- Install the missing file in the following directory, depending on your FreeBSD version and infrastructure:
/usr/lib32/
*(If your file is on an older operating system/usr/lib/You can also check the directory).* - Right click on the file you uploaded, File Permissions (Chmod) enter the value in 777 Update as .
Method 2: Creating a Symlink
Sometimes the searched library actually exists on your server, but only the version number is different (e.g.libmd.so.6there is but the gamelibmd.so.5is searching). In this case, we can create a symbolic link by misleading the system:
- Connect to Putty terminal and enter the library directory:
cd /usr/lib32 - To hyperlink the existing current file to the old searched file name, run the following command in your own way:
ln -s libmd.so.6 libmd.so.5 - Thanks to this command, the game
libmd.so.5The system automatically runs in the background when it calls the file.libmd.so.6will run the file.
Method 3: Installing FreeBSD 32-Bit Compatibility Packs
If you've installed it from scratch on your server and almost no base libraries are available, you can bulk download 32-bit library libraries using FreeBSD's official package manager. Run the following commands via Putty:
pkg update pkg install compat9x-i386 pkg install compat10x-i386 pkg install compat11x-i386
*(Note: You should choose the compat package that is suitable for the FreeBSD version of your server. For example, if you are using FreeBSD 13, you should install the `compat13x` packages).*
Method 4: Static Linking During the Source Compilation (Build) Phase
If you have the source code of the game, you can embed the libraries directly into the game file during the compilation phase, independent of the outside (Static link). So it doesn't matter which library is on the server:
- in your game source folder
MakefileOpen the file. - The lines containing the compilation options (Flags)
-staticRecompile source by adding the parameter (get Build).
This article is specially prepared for PvPServer.