Fix: 'Failed to open metamod.so' (Wrong Path or Arch)

December 18, 2025 Daemon666 8 min read 266 Aufrufe

Your server logs show a line like:

Failed to open metamod.so: cannot open shared object file

or the engine simply skips Metamod and AMX Mod X never loads. Metamod is the layer the engine loads as the game DLL; it then loads the real game DLL plus its own plugins (AMX Mod X among them). If Metamod itself will not open, nothing above it runs. On Linux this error is almost always a wrong path, a missing 32-bit dependency, or a permissions problem. Here is the fix.

1. Check the path in liblist.gam

With Metamod installed, cstrike/liblist.gam must point its gamedll_linux at Metamod's shared object, not the stock game DLL:

gamedll_linux "addons/metamod/dlls/metamod_i386.so"

If that path is wrong — a typo, the wrong folder, or a filename that does not match what is on disk — the engine reports it cannot open metamod.so. Confirm the file is exactly where the line says:

ls -l cstrike/addons/metamod/dlls/metamod_i386.so

The path in liblist.gam is relative to the cstrike/ game directory. A mismatch between the filename here and the actual file is the number-one cause.

2. Install the 32-bit libraries

Metamod is a 32-bit shared object. On a 64-bit server without i386 runtime libraries, dlopen fails even though the file exists — the loader cannot satisfy its dependencies. Install them (Debian/Ubuntu):

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y libc6:i386 libstdc++6:i386 lib32gcc-s1

Confirm the object is 32-bit and see what it needs:

file cstrike/addons/metamod/dlls/metamod_i386.so
ldd cstrike/addons/metamod/dlls/metamod_i386.so

ldd lists any not found dependency — that is your missing 32-bit lib. This overlaps with the libstdc++ error, the same root cause seen from a different angle.

3. Match Metamod flavour to your engine

There are two Metamods: classic Metamod and Metamod-r (optimized, for ReHLDS/ReGameDLL). Either can host AMX Mod X, but a build meant for one engine dropped onto another can fail to open or behave oddly. If you run ReHLDS, prefer Metamod-r; on stock HLDS, classic Metamod is fine. Reinstall the flavour matching your stack rather than mixing binaries from different sources.

4. Fix permissions and ownership

If the .so is not readable/executable by the user the server runs as, the open fails. Set sane permissions:

chmod 755 cstrike/addons/metamod/dlls/metamod_i386.so
chown -R csuser:csuser cstrike/addons

A file uploaded by root and run by an unprivileged service account is a classic cause — the file is there but the process cannot read it.

5. Confirm the game DLL Metamod loads is valid

Metamod, once open, reads addons/metamod/plugins.ini and then loads the real game DLL. If the failing message is really about the game DLL and not Metamod itself, you are looking at a different problem — see the cs.so load fix. Read the error carefully: it names either metamod (this guide) or cs.so (that one).

6. Rebuild liblist.gam from a known-good template

If you have edited liblist.gam by hand and lost track of what changed, it is faster to restore a clean one than to keep guessing. A working Metamod-enabled liblist.gam keeps every stock line and changes only the game DLL pointers to Metamod's object:

gamedll "addons\metamod\metamod.dll"
gamedll_linux "addons/metamod/dlls/metamod_i386.so"

Everything else — the game name, the fallback dir, the type — stays as the stock file shipped it. A common self-inflicted failure is deleting or corrupting an unrelated line in the file while editing the gamedll path, after which the engine cannot parse the file at all and skips Metamod silently. Keep a pristine copy of the stock liblist.gam so you can diff against it.

Common errors

  • cannot open shared object file — wrong path in liblist.gam or the file is missing. Match the line to the file on disk.
  • File exists but still fails — missing 32-bit libs. Run ldd and install what shows not found.
  • wrong ELF class: ELFCLASS64 — a 64-bit Metamod build. Install the 32-bit (_i386) object.
  • Permission denied — the service user cannot read the .so. Fix chmod/chown.
  • Loads on HLDS, fails on ReHLDS — wrong flavour. Use Metamod-r for ReHLDS.

Verification

Start the server and check Metamod reports itself:

meta version
meta list

meta version printing a version string means Metamod opened successfully; meta list should then show your plugins including AMX Mod X. If AMX Mod X is present and running, the whole chain — engine to Metamod to AMXX — is healthy. From there, plugin-load problems are a separate layer; see the Invalid Plugin fix if individual plugins fail after Metamod is up.

Mitwirkende: Daemon666 ✦
Teilen: