0

I am trying to make a bash script to connect to remote SQL server with sqlcmd

in the devp machine, as I have admin privileges, runs smoothly

but I NEED (and capitals because it is imperative) to build the functionality without packages installation because it needs to runon very limited machines

I upload de executable (/opt/mssql-tools/bin/sqlcmd) from devp machine, download on test machine and try to run with ./sqlcmd

sqlcmd: error while loading shared libraries: libodbc.so.2: cannot open shared object file: No such file or directory

so I try to do the same with the dependant library (/usr/lib64/libodbc.so.2.0.0) but error keep the same

I guess, that libraries should be installed and are not found placed on the same directory that the executable ...

any way to go?

I read about how to run a software in linux without installing it but not sure I understand it all, probably too complex for me.

6
  • You need to have the software installed properly on the target system. For something like sqlcmd there will be many non-trivial dependencies Feb 11, 2021 at 21:32
  • yes, this I know, I SHOULD have the software installed, BUT HARD REQQUIREMENTS, we must do it without any installation, otherwise, need to look for other solutions Feb 12, 2021 at 15:51
  • Do you need to trust the output from sqlcmd? Install it properly. Use a Change Request to have the software installed, if necessary. Otherwise, as you say, you'll need to look for other solutions Feb 12, 2021 at 17:28
  • Are you familiar with $LD_LIBRARY_PATH? That’s an env variable used in these kinds of situations
    – jsbillings
    Feb 14, 2021 at 14:04
  • @roaima, I do not understand what you mean by "seed to trust the output" , you mean matter of impersonation and so on? Feb 16, 2021 at 15:29

0

You must log in to answer this question.

Browse other questions tagged .