Gmpublish_linux Error while loading shared libraries

I’m trying to publish an addon to the workshop with the following code in shell.




#!/bin/sh

gmad_publish_file=$HOME/Documents/wew/project/project_workshop.gma
gmad_publish_icon=$HOME/Documents/wew/project/icon.png


cd $HOME/.local/share/Steam/steamapps/common/GarrysMod/bin # Goto the /bin/ folder
  ./gmpublish_linux create -addon "$gmad_publish_file" -icon "$gmad_publish_icon"
  echo "Gmad: Finished " # Then tell the user we are done here!
  exit 0 # Exit as 0 ( for logging wrappers )



And im getting this error even when ran with no extra arguments


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


I have tried Robotboy665’s suggestion but that didn’t work.
Any help?

I am running on Ubuntu 16.04


$ LD_LIBRARY_PATH=./ ./gmpublish_linux

[editline]24th August 2016[/editline]

For your case:


#!/bin/sh

gmad_publish_file=$HOME/Documents/wew/project/project_workshop.gma
gmad_publish_icon=$HOME/Documents/wew/project/icon.png


cd $HOME/.local/share/Steam/steamapps/common/GarrysMod/bin # Goto the /bin/ folder
  LD_LIBRARY_PATH=./ ./gmpublish_linux create -addon "$gmad_publish_file" -icon "$gmad_publish_icon"
  echo "Gmad: Finished " # Then tell the user we are done here!
  exit 0 # Exit as 0 ( for logging wrappers )

Seems to have worked, thanks for the help :smiley:

EDIT: I’m getting this error now


Couldn't load icon - is it a jpeg?


Your icon must be 512x512 jpeg file. PNG not allowed.

Any good websites for converting pngs to jpeg?

Just download any graphics painting program available for your Operating System jee, how did you even create the image in the first place?

I’ve already tried exporting as jpeg.
It (SURPRISE) didn’t work

Also tired exporting with the original gimp source file and it still shows that message.

Your JPEG MUST be a Baseline JPEG, not a progressive JPEG.

[editline]25th August 2016[/editline]

More info: http://wiki.garrysmod.com/page/Workshop_Addon_Creation#The_icon

Working now, thanks for the help.
Info for lurkers: https://www.youtube.com/watch?v=SadyOSO3D8w