A plausible explanation for the difference in behavior is that the working and non-working commands are loading different libraries because they have different settings for the library search path
LD_LIBRARY_PATH. There are other environment variables that could matter but are less likely, such as
./Logic is a script that depends on some executables — but the error message isn't consistent with that), etc.
A plausible explanation for why invoking the command from an interactive instance of bash doesn't work, but invoking the command directly from
sudo works, is that you are setting this environment in
.bashrc, the file that interactive instances of bash runs. Running
sudo clears almost all environment variables, hence
sudo ./Logic works; but
sudo bash followed by
./Logic doesn't work because running
bash sets those variables again.
You should set environment variables in
.profile (which is executed when the session starts), not in
.bashrc. Your symptoms are characteristic of one of the problems with changing environment variables in
The setting for
LD_LIBRARY_PATH should probably not be present in your setup files at all. Adding a directory that shadows system libraries is likely to be a source of incompatibilities. If you need it to run a particular program, set
LD_LIBRARY_PATH only when running that program (via a shell wrapper, if you want to automate it), don't set it globally.