Raised This Month: $ Target: $400
 0% 

Solved Sourcemod and metamod don't work on WSL2 Ubuntu 20.04 LTS


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
umar_0x01
Junior Member
Join Date: May 2021
Old 06-22-2021 , 09:30   Sourcemod and metamod don't work on WSL2 Ubuntu 20.04 LTS
Reply With Quote #1

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!
Attached Files
File Type: txt server-log.txt (42.9 KB, 105 views)
File Type: txt file-dir.txt (75.5 KB, 95 views)

Last edited by umar_0x01; 06-24-2021 at 10:45.
umar_0x01 is offline
Maxximou5
AlliedModders Donor
Join Date: Feb 2013
Old 06-23-2021 , 15:09   Re: Sourcemod and metamod don't work on WSL2 Ubuntu 20.04 LTS
Reply With Quote #2

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 View Post
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.
Maxximou5 is offline
umar_0x01
Junior Member
Join Date: May 2021
Old 06-24-2021 , 00:55   Re: Sourcemod and metamod don't work on WSL2 Ubuntu 20.04 LTS
Reply With Quote #3

Quote:
Originally Posted by Maxximou5 View Post
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!
umar_0x01 is offline
Maxximou5
AlliedModders Donor
Join Date: Feb 2013
Old 06-24-2021 , 10:38   Re: Sourcemod and metamod don't work on WSL2 Ubuntu 20.04 LTS
Reply With Quote #4

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]).
Maxximou5 is offline
umar_0x01
Junior Member
Join Date: May 2021
Old 06-24-2021 , 10:46   Re: Sourcemod and metamod don't work on WSL2 Ubuntu 20.04 LTS
Reply With Quote #5

Quote:
Originally Posted by Maxximou5 View Post
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.
umar_0x01 is offline
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 06-09-2022 , 10:50   Re: Sourcemod and metamod don't work on WSL2 Ubuntu 20.04 LTS
Reply With Quote #6

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 019: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 ~`

Last edited by ZASTRELIS; 06-10-2022 at 01:55.
ZASTRELIS is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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