Greetings
Hereby im sharing with you a script that i've made today for exporting all of the needed dependencies of a binary.
This is useful so you don't need to copy line by line each lib file.
Please ensure that you change the binary's path. In this case 'db/db_r' and 'game/game_r'
# Destination path: /tmp/server_lib32
rm -rf /tmp/server_lib32
mkdir -p /tmp/server_lib32
ldd db/db_r | tail -n+2 | awk '{sub(/.*=> /, ""); print}' | sed 's/([^)]*)//g' | sed -e 's/^[ \t]*//' | xargs -I {} cp {} /tmp/server_lib32/.
ldd game/game_r | tail -n+2 | awk '{sub(/.*=> /, ""); print}' | sed 's/([^)]*)//g' | sed -e 's/^[ \t]*//' | xargs -I {} cp {} /tmp/server_lib32/.
Best regards,
Gamemaster