AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=58)
-   -   Solved Sourcemod and metamod don't work on WSL2 Ubuntu 20.04 LTS (https://forums.alliedmods.net/showthread.php?t=333150)

umar_0x01 06-22-2021 09:30

Sourcemod and metamod don't work on WSL2 Ubuntu 20.04 LTS
 
2 Attachment(s)
Hi everyone,

I've recently been trying to get sourcemod work on the latest WSL2 Ubuntu 20.04's installation. Since WSL2 imitates the Linux kernel, all's well and CS:GO server runs fine too.

I'm doing the setup for some local testing of plugins before pushing to my (AWS - Ubuntu 18.04) server which is working fine with both sourcemod and metamod.

I've installed almost all dependency issues I found, made sure to follow the installation guide of sourcemod too but sourcemod or metamod still don't work.

I'm installing the dependencies through:
Code:

sudo apt-get -y install unzip zip software-properties-common aria2 lib32z1 zlib1g mysql-server lib32gcc1 net-tools
Using the following snippet for setting up the CS:GO server:
Code:

# Installing steamcmd for installation of csgo
mkdir -p /home/$USER/steamcmd && \
    cd /home/$USER/steamcmd && \
    download http://media.steampowered.com/installer/steamcmd_linux.tar.gz -o steamcmd_linux.tar.gz && \
    tar -xvf steamcmd_linux.tar.gz && \
    rm -rfv steamcmd_linux.tar.gz

# Installing csgo server in ~/csgo-ds/ directory
cd && \
        /home/$USER/steamcmd/steamcmd.sh +login anonymous +force_install_dir $CSGO_INSTALL_LOCATION +app_update 740 +quit

OS release:
Code:

└─$ cat /etc/*release                                                                                                                                                                                      130 ⨯
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.2 LTS"
NAME="Ubuntu"
VERSION="20.04.2 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.2 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

I've attached the file containing the complete logs of the server running. Also, the tree of the addons folder. I'm also using latest version of both sourcemod and metamod.

Thanks for looking into this!

Maxximou5 06-23-2021 15:09

Re: Sourcemod and metamod don't work on WSL2 Ubuntu 20.04 LTS
 
I tried it on Debian for WSL2, no issues. Though for the sake of clarity, I installed Ubuntu 20.0.04 LTS for WSL2 and that worked as well. I don't see your steps on how you installed SourceMod or MetaMod.
PHP Code:

meta list
Listing 3 plugins:
  [
01SourceMod (1.10.0.6503by AlliedModders LLC
  
[02CS Tools (1.10.0.6503by AlliedModders LLC
  
[03SDK Tools (1.10.0.6503by AlliedModders LLC
Host state 5 at Wed Jun 23 12
:09:14 2021 

Your log provided you have the following -
Quote:

Unable to load plugin "addons/metamod/bin/linux64/server"
Failed to load plugin "addons/metamod/bin/server"
You have a fatal.log for metamod -
csgo-ds/csgo/addons/metamod/bin/metamod-fatal.log

Check the contents of that file and it will give some insight into why it did not load.

Quote:

Originally Posted by umar_0x01 (Post 2750713)
I'm also using latest version of both sourcemod and metamod.

Never ever for any reason ever tell someone you're running the latest. It doesn't provide any helpful information, especially if by the time you posted something, a new version was released. Always state the exact version you are running for anything.

umar_0x01 06-24-2021 00:55

Re: Sourcemod and metamod don't work on WSL2 Ubuntu 20.04 LTS
 
Quote:

Originally Posted by Maxximou5 (Post 2750902)
I tried it on Debian for WSL2, no issues. Though for the sake of clarity, I installed Ubuntu 20.0.04 LTS for WSL2 and that worked as well. I don't see your steps on how you installed SourceMod or MetaMod.
PHP Code:

meta list
Listing 3 plugins:
  [
01SourceMod (1.10.0.6503by AlliedModders LLC
  
[02CS Tools (1.10.0.6503by AlliedModders LLC
  
[03SDK Tools (1.10.0.6503by AlliedModders LLC
Host state 5 at Wed Jun 23 12
:09:14 2021 

Your log provided you have the following -


You have a fatal.log for metamod -
csgo-ds/csgo/addons/metamod/bin/metamod-fatal.log

Check the contents of that file and it will give some insight into why it did not load.



Never ever for any reason ever tell someone you're running the latest. It doesn't provide any helpful information, especially if by the time you posted something, a new version was released. Always state the exact version you are running for anything.

Hi,

Thank you very much for bearing it with me, it seems the file
Code:

/home/umar_0x01/csgo-ds/csgo/addons/metamod/bin/metamod-fatal.log
was the culprit and wasn't letting sourcemod & metamod to run.

It contained:
Code:

└─$ cat metamod-fatal.log
L 06/22/2021 - 18:15:45: Detected engine 11 but could not load: libstdc++.so.6: cannot open shared object file: No such file or directory
L 06/22/2021 - 18:25:00: Detected engine 11 but could not load: libstdc++.so.6: cannot open shared object file: No such file or directory

Running following fixed it:
Code:

sudo apt-get install lib32stdc++6
I'll make sure to include exact version in the future issues. Sorry as this was my first issue.

Again thank you very much!

Maxximou5 06-24-2021 10:38

Re: Sourcemod and metamod don't work on WSL2 Ubuntu 20.04 LTS
 
Glad you got it figured out, and thank you for letting everyone know how you fixed it!

You can mark this as solved by editing your first post, go advanced, and then selecting a prefix ([Solved]).

umar_0x01 06-24-2021 10:46

Re: Sourcemod and metamod don't work on WSL2 Ubuntu 20.04 LTS
 
Quote:

Originally Posted by Maxximou5 (Post 2750983)
Glad you got it figured out, and thank you for letting everyone know how you fixed it!

You can mark this as solved by editing your first post, go advanced, and then selecting a prefix ([Solved]).

Thank you very much! Updated.

ZASTRELIS 06-09-2022 10:50

Re: Sourcemod and metamod don't work on WSL2 Ubuntu 20.04 LTS
 
Quote:

failed to dlopen /home/steam/SRCDS/csgo/addons/metamod/bin/linux64/server.so error=/home/steam/SRCDS/csgo/addons/metamod/bin/linux64/server.so: wrong ELF class: ELFCLASS64
Unable to load plugin "addons/metamod/bin/linux64/server"
failed to dlopen /home/steam/SRCDS/csgo/addons/metamod/bin/server.so error=/home/steam/SRCDS/csgo/addons/metamod/bin/server.so: failed to map segment from shared object
Unable to load plugin "addons/metamod/bin/server"
I've some problem, csgo starting, but metamod not works..

Quote:

RUN dpkg --add-architecture i386 && apt-get update && apt-get install -y \
locales \
net-tools \
iputils-ping \
binutils \
gdb \
lib32gcc-s1 \
lib32stdc++6 \
lib32z1 \
libsdl2-2.0-0:i386 \
tar \
wget \
curl \
tmux \
installed latest mm and sm

Quote:

-rw-r--r-- 1 steam steam 27024 Jul 12 2021 server.so
-rw-r--r-- 1 steam steam 27044 Jul 12 2021 server_i486.so
steam@8ba41fcb0241:~/SRCDS/csgo/addons/metamod/bin$ pwd
/home/steam/SRCDS/csgo/addons/metamod/bin
steam@8ba41fcb0241:~/SRCDS/csgo/addons/metamod/bin$ cd linux64/
steam@8ba41fcb0241:~/SRCDS/csgo/addons/metamod/bin/linux64$ ls -l
total 340
-rw-r--r-- 1 steam steam 308864 Jul 12 2021 metamod.2.csgo.so
-rw-r--r-- 1 steam steam 33240 Jul 12 2021 server.so
steam@8ba41fcb0241:~/SRCDS/csgo/addons/metamod/bin/linux64$
Quote:

Linux 8ba41fcb0241 5.13.0-46-generic #51-Ubuntu SMP Sat May 21 01:39:51 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Quote:

21.10
Yes! Fixed. Move out lib from bin dir. Works on Hyper-V, WSL2, Ubuntu 22.04 LTS
`sudo mv /home/pro/CSGO/bin/libgcc_s.so.1 ~`


All times are GMT -4. The time now is 09:47.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.