gmpublish_linux shared library error


$ ./gmpublish_linux create -addon *.gma -icon *.jpg

returns


$ ./gmpublish_linux: error while loading shared libraries: libsteam_api.so: cannot open shared object file: No such file or directory

There’s a file called libsteam_api.so in my steamapps/common/GarrysMod/bin directory, so I have no idea what’s happening. The error happens no matter what arguments I use.

Do not move the gmpublish_linux anywhere, use it from steamapps/common/GarrysMod/bin.

That’s where I’m running it from… right?
Full Konsole:


charles@charles-desktop:~/.steam/steam/steamapps/common/GarrysMod/bin > ./gmpublish_linux create -addon *.gma -icon *.jpg 
./gmpublish_linux: error while loading shared libraries: libsteam_api.so: cannot open shared object file: No such file or directory

Note that Valve has been updating lots of libraries, though I can’t find anything on this in particular. Anyone have a fallback that would actually let me upload?

What’s this had to do with anything?

If libsteam_api.so would have been corrupted, GMod won’t launch for yourself either.

I am no Linux specialist, but maybe try googling some solutions?

I can’t promise it will fix it, but its worth a try.

First off, sorry for bumping such an old thread. It’s the first search result and the solution is fairly simple, so I figured I should share.

The ldconfig command can easily import the steam libraries.

Just run the following from the steamapps/common/GarrysMod/bin directory:



sudo /sbin/ldconfig -v "`pwd`"


This will update the “linked dependancies” config to include the Garry’s Mod bin dir which will fix the problems (the gmpublish_linux file might actually become portable this way, but I won’t recommend this).

Hope this helps anyone else in need.

Don’t do that! It breaks things really badly. Use these commands for uploading instead.


cd $HOME/.steam/steam/steamapps/common/GarrysMod/bin
LD_LIBRARY_PATH=./ ./gmpublish_linux create -addon path_to.gma -icon path_to.jpg

Please don’t do this; see below.

It does have the potential to break things. The garrysmod/bin directory has its own version of libudev, libprofiler, libSDL2, and libtcmalloc. On a x86 system the ld cache could potentially prioritize these gmod versions of the libraries over your system/package managed version. On a x86_64 arch they will get added but wont interfere with any 64bit processes.

Set LD_LIBRARY_PATH manually. Or you can export it in your profile/bashrc and add the directory to your PATH envvar which will allow you to run gmpublish_linux from anywhere.

[editline]1st December 2016[/editline]

Also Willox / RBB if you can change the gmpublish_linux compiler options to set rpath to the current directory then it should find libsteam_api when you execute it from garrysmod/bin.