Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: libcurl.so: cannot open shared object file: No such file or directory #50

Open
almereyda opened this issue Oct 22, 2023 · 6 comments
Assignees
Labels
question Further information is requested

Comments

@almereyda
Copy link

Running

docker compose run --rm login

against the Compose manifest

services:
  login:
    image: cm2network/steamcmd
    restart: never
    command: bash /home/steam/steamcmd/steamcmd.sh +login ${STEAM_USER} ${STEAM_PASSWORD} +quit
    volumes:
      - .state/Steam:/home/steam/Steam

  cs2:
    image: cm2network/cs2
    restart: unless-stopped
    volumes:
      - .state/Steam:/home/steam/Steam
      - .state/cs2:/home/steam/cs2-dedicated
    env_file:
      - cs2.env
    ports:
      - "27015:27015/tcp"
      - "27015:27015/udp"
      - "27020:27020/udp"

with the .env file

STEAM_USER=example
STEAM_PASSWORD=example

and cs2.env with

STEAMUSER=example
CS2_HOSTNAME=Example
CS2_PORT=27015
CS2_TV_PORT=27020
CS2_LAN=0
CS2_RCONPW=987654321
CS2_PW=4321
CS2_MAXPLAYERS=14
CS2_GAMETYPE=0
CS2_GAMEMODE=0
CS2_MAPGROUP=mg_active
CS2_STARTMAP=de_dust2
CS2_ADDITIONAL_ARGS=
CS2_BOT_DIFFICULTY=3
CS2_BOT_QUOTA=6
CS2_BOT_QUOTA_MODE=fill

yields an error message, but finishes with OK:

Creating cs2chnio_login_run ... done
Redirecting stderr to '/home/steam/Steam/logs/stderr.txt'
Logging directory: '/home/steam/Steam/logs'
[  0%] Checking for available updates...
[----] Verifying installation...
[  0%] Downloading update...
[  0%] Checking for available updates...
[----] Download complete.
[----] Extracting package...
[----] Extracting package...
[----] Extracting package...
[----] Extracting package...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Cleaning up...
[----] Update complete, launching Steamcmd...
Redirecting stderr to '/home/steam/Steam/logs/stderr.txt'
Logging directory: '/home/steam/Steam/logs'
[  0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation - version 1696019544
-- type 'quit' to exit --
Loading Steam API...OK
Logging in user 'example' to Steam Public...
This computer has not been authenticated for your account using Steam Guard.
Please check your email for the message from Steam, and enter the Steam Guard
 code from that message.
You can also enter this code at any time using 'set_steam_guard_code'
 at the console.
Steam Guard code:ABCDE
OK
Waiting for client config...OK
Waiting for user info...src/clientdll/remotestoragefilesynccontext.cpp (947) : Assertion Failed: Failed to write file after download (2)

assert_20231022234928_67.dmp[88]: Uploading dump (out-of-process)
/tmp/dumps/assert_20231022234928_67.dmp

assert_20231022234928_67.dmp[88]: Finished uploading minidump (out-of-process): success = no

assert_20231022234928_67.dmp[88]: error: libcurl.so: cannot open shared object file: No such file or directory

assert_20231022234928_67.dmp[88]: file ''/tmp/dumps/assert_20231022234928_67.dmp'', upload no: ''libcurl.so: cannot open shared object file: No such file or directory''

src/clientdll/remotestoragefilesynccontext.cpp (947) : Assertion Failed: Failed to write file after download (2)

src/clientdll/userremotestorage.cpp (4484) : bRet

but nothing is saved to the Steam directory:

$ ls -lan .state/*    
.state/cs2:
total 18
drwxrwxrwx 2 0 0 2 Okt 23 00:17 .
drwxr-xr-x 4 0 0 4 Okt 23 00:23 ..

.state/Steam:
total 18
drwxr-xr-x 2 0 0 2 Okt 23 00:23 .
drwxr-xr-x 4 0 0 4 Okt 23 00:23 ..
@serpi90
Copy link

serpi90 commented Feb 4, 2024

Steamcmd is probably using the old version 3 of libcurl, installing libcurl3-gnutls should fix it.

@CM2Walki
Copy link
Owner

CM2Walki commented Feb 13, 2024

Steam>login [username] [password]
Logging in user '[username]' to Steam Public...
Enter the current code from your Steam Guard Mobile Authenticator app
Two-factor code:[SteamGuardCode]
OK
Waiting for client config...OK
Waiting for user info...OK

Steam>

I just tried it with the new bookworm and I'm not receiving this error.

Can you go and check if this fixes the issue?

@CM2Walki CM2Walki self-assigned this Feb 13, 2024
@CM2Walki CM2Walki added the question Further information is requested label Feb 13, 2024
@almereyda
Copy link
Author

Thanks, I should try it again.

Is https://github.com/CM2Walki/CS2/issues/3 still considered to be merged at some point?

@CM2Walki
Copy link
Owner

@almereyda I still have some catching up to do with my other repositories, but I'll try to get it done on the weekend.

@almereyda
Copy link
Author

almereyda commented Feb 20, 2024

This was a permission issue. You can see above that the .state/Steam volume has the permissions 0:0, while the image runs commands as 1000:1000. Changing the ownership of the directory prior running the container resolved the situation.

$ docker-compose run --rm login     
Creating cs2chnio_login_run ... done
…
Steam Console Client (c) Valve Corporation - version 1705108307
-- type 'quit' to exit --
Loading Steam API...OK
Logging in user 'account' to Steam Public...
This computer has not been authenticated for your account using Steam Guard.
Please check your email for the message from Steam, and enter the Steam Guard
 code from that message.
You can also enter this code at any time using 'set_steam_guard_code'
 at the console.
Steam Guard code:
OK
Waiting for client config...OK
Waiting for user info...OK

This is due to the way how Docker handles permissions in our system. Users that are running Docker commands via an unprivileged user or run the container in rootless mode or Podman may not experience this effect.

I might also have to try this Steam Guard Mobile Authenticator app some time.

Leaving this open to discuss if the container should be built in a way that it checks for being able to write to the volume mount, before initiating the login.

@avoidik
Copy link

avoidik commented Apr 5, 2024

steamcmd uses linux32 compiled binaries on top of linux64 base image, that's why it is unable to load libcurl library:

STEAMROOT="$(cd "$(dirname "$0")" && echo $PWD)"
...
STEAMCMD=`basename "$0" .sh`

UNAME=`uname`
if [ "$UNAME" == "Linux" ]; then
  STEAMEXE="${STEAMROOT}/linux32/${STEAMCMD}"
  PLATFORM="linux32"
  export LD_LIBRARY_PATH="$STEAMROOT/$PLATFORM:${LD_LIBRARY_PATH-}"
else # if [ "$UNAME" == "Darwin" ]; then
  ...
fi

where STEAMEXE points to /home/steam/steamcmd/linux32/steamcmd which in turn is a 32-bit Linux ELF executable

$ file /home/steam/steamcmd/linux32/steamcmd
/home/steam/steamcmd/linux32/steamcmd: ELF 32-bit LSB pie executable, Intel 80386, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux.so.2, BuildID[sha1]=f96d428a4d4f46227bd6f6901d6998b0be787379, for GNU/Linux 2.6.24, not stripped

I guess a potential fix could look like this:

RUN dpkg --add-architecture i386 && apk update && apt install libcurl4-openssl-dev:i386

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants